Show display name of selected folder in unread widget config screen
This commit is contained in:
parent
855006b74b
commit
cdc7504c2e
2 changed files with 7 additions and 3 deletions
|
@ -40,6 +40,7 @@ public class ChooseFolder extends K9ListActivity {
|
|||
public static final String EXTRA_SHOW_CURRENT = "com.fsck.k9.ChooseFolder_showcurrent";
|
||||
public static final String EXTRA_SHOW_FOLDER_NONE = "com.fsck.k9.ChooseFolder_showOptionNone";
|
||||
public static final String EXTRA_SHOW_DISPLAYABLE_ONLY = "com.fsck.k9.ChooseFolder_showDisplayableOnly";
|
||||
public static final String RESULT_FOLDER_DISPLAY_NAME = "folderDisplayName";
|
||||
|
||||
|
||||
String currentFolder;
|
||||
|
@ -132,6 +133,7 @@ public class ChooseFolder extends K9ListActivity {
|
|||
if (mMessageReference != null) {
|
||||
result.putExtra(EXTRA_MESSAGE, mMessageReference.toIdentityString());
|
||||
}
|
||||
result.putExtra(RESULT_FOLDER_DISPLAY_NAME, folder.displayName);
|
||||
setResult(RESULT_OK, result);
|
||||
finish();
|
||||
}
|
||||
|
|
|
@ -118,7 +118,9 @@ public class UnreadWidgetConfiguration extends K9PreferenceActivity {
|
|||
handleChooseAccount(data.getStringExtra(ChooseAccount.EXTRA_ACCOUNT_UUID));
|
||||
break;
|
||||
case REQUEST_CHOOSE_FOLDER:
|
||||
handleChooseFolder(data.getStringExtra(ChooseFolder.EXTRA_NEW_FOLDER));
|
||||
String folderServerId = data.getStringExtra(ChooseFolder.EXTRA_NEW_FOLDER);
|
||||
String folderDisplayName = data.getStringExtra(ChooseFolder.RESULT_FOLDER_DISPLAY_NAME);
|
||||
handleChooseFolder(folderServerId, folderDisplayName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -165,9 +167,9 @@ public class UnreadWidgetConfiguration extends K9PreferenceActivity {
|
|||
unreadFolder.setEnabled(true);
|
||||
}
|
||||
|
||||
private void handleChooseFolder(String folderServerId) {
|
||||
private void handleChooseFolder(String folderServerId, String folderDisplayName) {
|
||||
selectedFolder = folderServerId;
|
||||
unreadFolder.setSummary(selectedFolder);
|
||||
unreadFolder.setSummary(folderDisplayName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue