Loading app/ui/src/main/java/com/fsck/k9/activity/MessageList.java +11 −2 Original line number Diff line number Diff line Loading @@ -617,6 +617,15 @@ public class MessageList extends K9Activity implements MessageListFragmentListen actionDisplaySearch(this, SearchAccount.createUnifiedInboxAccount().getRelatedSearch(), false, false); } public void openFolderSettings() { if (account == null) { Timber.e("Tried to open account settings, but no account selected!"); return; } FolderList.actionHandleAccount(this, account); } public void openRealAccount(Account realAccount) { if (realAccount.getAutoExpandFolder() == null) { FolderList.actionHandleAccount(this, realAccount); Loading app/ui/src/main/java/com/fsck/k9/ui/K9Drawer.java +25 −6 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ public class K9Drawer { private static final long DRAWER_ID_UNIFIED_INBOX = 0; private static final long DRAWER_ID_PREFERENCES = 1; private static final long DRAWER_ID_FOLDERS = 2; private final FolderNameFormatter folderNameFormatter = DI.get(FolderNameFormatter.class); Loading Loading @@ -75,6 +76,8 @@ public class K9Drawer { public K9Drawer(MessageList parent, Bundle savedInstanceState) { this.parent = parent; initializeFolderIcons(); drawer = new DrawerBuilder() .withActivity(parent) .withDisplayBelowStatusBar(false) Loading @@ -88,8 +91,6 @@ public class K9Drawer { .build(); addFooterItems(); initializeFolderIcons(); } private AccountHeader buildAccountHeader() { Loading Loading @@ -159,11 +160,17 @@ public class K9Drawer { private void addFooterItems() { drawer.addItems(new DividerDrawerItem(), new PrimaryDrawerItem() .withName(R.string.folders_action) .withIcon(iconFolderResId) .withIdentifier(DRAWER_ID_FOLDERS) .withSelectable(false), new PrimaryDrawerItem() .withName(R.string.preferences_action) .withIcon(getResId(R.attr.iconActionSettings)) .withIdentifier(DRAWER_ID_PREFERENCES) .withSelectable(false)); .withSelectable(false) ); } private void initializeFolderIcons() { Loading Loading @@ -218,7 +225,14 @@ public class K9Drawer { setUserFolders(folders); } }); updateFolderSettingsItem(); } } private void updateFolderSettingsItem() { IDrawerItem drawerItem = drawer.getDrawerItem(DRAWER_ID_FOLDERS); drawerItem.withEnabled(!unifiedInboxSelected); drawer.updateItem(drawerItem); } private OnDrawerItemClickListener createItemClickListener() { Loading @@ -229,6 +243,9 @@ public class K9Drawer { if (id == DRAWER_ID_PREFERENCES) { SettingsActivity.launch(parent); return false; } else if (id == DRAWER_ID_FOLDERS) { parent.openFolderSettings(); return false; } else { Folder folder = (Folder) drawerItem.getTag(); parent.openFolder(folder.getServerId()); Loading Loading @@ -285,6 +302,7 @@ public class K9Drawer { return; } } updateFolderSettingsItem(); } public void selectUnifiedInbox() { Loading @@ -293,6 +311,7 @@ public class K9Drawer { accountHeader.setActiveProfile(DRAWER_ID_UNIFIED_INBOX); accountHeader.getHeaderBackgroundView().setColorFilter(0xFFFFFFFF, PorterDuff.Mode.MULTIPLY); clearUserFolders(); updateFolderSettingsItem(); } public DrawerLayout getLayout() { Loading app/ui/src/main/res/menu/folder_context.xml +1 −1 Original line number Diff line number Diff line Loading @@ -10,6 +10,6 @@ /> <item android:id="@+id/folder_settings" android:title="@string/folder_settings_action" android:title="@string/folders_action" /> </menu> app/ui/src/main/res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,7 @@ Please submit bug reports, contribute new features and ask questions at <string name="search_action">Search</string> <string name="search_results">Search results</string> <string name="preferences_action">Settings</string> <string name="folders_action">Manage folders</string> <string name="account_settings_action">Account settings</string> <string name="folder_settings_action">Folder settings</string> <string name="global_settings_action">Global settings</string> Loading Loading
app/ui/src/main/java/com/fsck/k9/activity/MessageList.java +11 −2 Original line number Diff line number Diff line Loading @@ -617,6 +617,15 @@ public class MessageList extends K9Activity implements MessageListFragmentListen actionDisplaySearch(this, SearchAccount.createUnifiedInboxAccount().getRelatedSearch(), false, false); } public void openFolderSettings() { if (account == null) { Timber.e("Tried to open account settings, but no account selected!"); return; } FolderList.actionHandleAccount(this, account); } public void openRealAccount(Account realAccount) { if (realAccount.getAutoExpandFolder() == null) { FolderList.actionHandleAccount(this, realAccount); Loading
app/ui/src/main/java/com/fsck/k9/ui/K9Drawer.java +25 −6 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ public class K9Drawer { private static final long DRAWER_ID_UNIFIED_INBOX = 0; private static final long DRAWER_ID_PREFERENCES = 1; private static final long DRAWER_ID_FOLDERS = 2; private final FolderNameFormatter folderNameFormatter = DI.get(FolderNameFormatter.class); Loading Loading @@ -75,6 +76,8 @@ public class K9Drawer { public K9Drawer(MessageList parent, Bundle savedInstanceState) { this.parent = parent; initializeFolderIcons(); drawer = new DrawerBuilder() .withActivity(parent) .withDisplayBelowStatusBar(false) Loading @@ -88,8 +91,6 @@ public class K9Drawer { .build(); addFooterItems(); initializeFolderIcons(); } private AccountHeader buildAccountHeader() { Loading Loading @@ -159,11 +160,17 @@ public class K9Drawer { private void addFooterItems() { drawer.addItems(new DividerDrawerItem(), new PrimaryDrawerItem() .withName(R.string.folders_action) .withIcon(iconFolderResId) .withIdentifier(DRAWER_ID_FOLDERS) .withSelectable(false), new PrimaryDrawerItem() .withName(R.string.preferences_action) .withIcon(getResId(R.attr.iconActionSettings)) .withIdentifier(DRAWER_ID_PREFERENCES) .withSelectable(false)); .withSelectable(false) ); } private void initializeFolderIcons() { Loading Loading @@ -218,7 +225,14 @@ public class K9Drawer { setUserFolders(folders); } }); updateFolderSettingsItem(); } } private void updateFolderSettingsItem() { IDrawerItem drawerItem = drawer.getDrawerItem(DRAWER_ID_FOLDERS); drawerItem.withEnabled(!unifiedInboxSelected); drawer.updateItem(drawerItem); } private OnDrawerItemClickListener createItemClickListener() { Loading @@ -229,6 +243,9 @@ public class K9Drawer { if (id == DRAWER_ID_PREFERENCES) { SettingsActivity.launch(parent); return false; } else if (id == DRAWER_ID_FOLDERS) { parent.openFolderSettings(); return false; } else { Folder folder = (Folder) drawerItem.getTag(); parent.openFolder(folder.getServerId()); Loading Loading @@ -285,6 +302,7 @@ public class K9Drawer { return; } } updateFolderSettingsItem(); } public void selectUnifiedInbox() { Loading @@ -293,6 +311,7 @@ public class K9Drawer { accountHeader.setActiveProfile(DRAWER_ID_UNIFIED_INBOX); accountHeader.getHeaderBackgroundView().setColorFilter(0xFFFFFFFF, PorterDuff.Mode.MULTIPLY); clearUserFolders(); updateFolderSettingsItem(); } public DrawerLayout getLayout() { Loading
app/ui/src/main/res/menu/folder_context.xml +1 −1 Original line number Diff line number Diff line Loading @@ -10,6 +10,6 @@ /> <item android:id="@+id/folder_settings" android:title="@string/folder_settings_action" android:title="@string/folders_action" /> </menu>
app/ui/src/main/res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,7 @@ Please submit bug reports, contribute new features and ask questions at <string name="search_action">Search</string> <string name="search_results">Search results</string> <string name="preferences_action">Settings</string> <string name="folders_action">Manage folders</string> <string name="account_settings_action">Account settings</string> <string name="folder_settings_action">Folder settings</string> <string name="global_settings_action">Global settings</string> Loading