Merge pull request #4239 from k9mail/fix_app_start
Fix app start and launcher activities after 'Accounts' activity removal
This commit is contained in:
commit
a2d11393cf
2 changed files with 10 additions and 6 deletions
|
@ -84,12 +84,8 @@
|
||||||
<!-- TODO: Remove after 2020-12-31 -->
|
<!-- TODO: Remove after 2020-12-31 -->
|
||||||
<activity-alias
|
<activity-alias
|
||||||
android:name=".activity.Accounts"
|
android:name=".activity.Accounts"
|
||||||
android:targetActivity=".activity.MessageList" >
|
android:targetActivity=".activity.MessageList"
|
||||||
<intent-filter>
|
android:exported="true" />
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity-alias>
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.onboarding.OnboardingActivity"
|
android:name=".ui.onboarding.OnboardingActivity"
|
||||||
|
|
|
@ -59,6 +59,7 @@ import com.fsck.k9.ui.R;
|
||||||
import com.fsck.k9.ui.Theme;
|
import com.fsck.k9.ui.Theme;
|
||||||
import com.fsck.k9.ui.messageview.MessageViewFragment;
|
import com.fsck.k9.ui.messageview.MessageViewFragment;
|
||||||
import com.fsck.k9.ui.messageview.MessageViewFragment.MessageViewFragmentListener;
|
import com.fsck.k9.ui.messageview.MessageViewFragment.MessageViewFragmentListener;
|
||||||
|
import com.fsck.k9.ui.onboarding.OnboardingActivity;
|
||||||
import com.fsck.k9.ui.settings.SettingsActivity;
|
import com.fsck.k9.ui.settings.SettingsActivity;
|
||||||
import com.fsck.k9.view.ViewSwitcher;
|
import com.fsck.k9.view.ViewSwitcher;
|
||||||
import com.fsck.k9.view.ViewSwitcher.OnSwitchCompleteListener;
|
import com.fsck.k9.view.ViewSwitcher.OnSwitchCompleteListener;
|
||||||
|
@ -208,6 +209,13 @@ public class MessageList extends K9Activity implements MessageListFragmentListen
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
List<Account> accounts = preferences.getAccounts();
|
||||||
|
if (accounts.isEmpty()) {
|
||||||
|
OnboardingActivity.launch(this);
|
||||||
|
finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (UpgradeDatabases.actionUpgradeDatabases(this, getIntent())) {
|
if (UpgradeDatabases.actionUpgradeDatabases(this, getIntent())) {
|
||||||
finish();
|
finish();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue