mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-30 09:31:11 +01:00
Added refresh shortcut
This commit is contained in:
@@ -34,6 +34,8 @@ import androidx.preference.PreferenceManager;
|
||||
import java.util.List;
|
||||
|
||||
public class ActivityMain extends ActivityBase implements FragmentManager.OnBackStackChangedListener, SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
private static final String ACTION_REFRESH = BuildConfig.APPLICATION_ID + ".REFRESH";
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
getSupportFragmentManager().addOnBackStackChangedListener(this);
|
||||
@@ -83,7 +85,10 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack
|
||||
protected void onExecuted(Bundle args, Boolean hasAccounts) {
|
||||
if (hasAccounts) {
|
||||
startActivity(new Intent(ActivityMain.this, ActivityView.class));
|
||||
ServiceSynchronize.watchdog(ActivityMain.this);
|
||||
if (ACTION_REFRESH.equals(getIntent().getAction()))
|
||||
ServiceSynchronize.process(ActivityMain.this, true);
|
||||
else
|
||||
ServiceSynchronize.watchdog(ActivityMain.this);
|
||||
ServiceSend.watchdog(ActivityMain.this);
|
||||
} else
|
||||
startActivity(new Intent(ActivityMain.this, ActivitySetup.class));
|
||||
|
||||
Reference in New Issue
Block a user