mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -05:00
Partial implementation for Issue 1059. Doesn't help those without
physical keyboards, though, and should be modified to only re-setup pushers. Current implementation causes a wasteful reschedule of polling. Also gets the help Toast for the folder up-to-date after the FolderList/MessageList split.
This commit is contained in:
parent
9ec77a9f9a
commit
6f064e1193
@ -594,7 +594,14 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin
|
|||||||
<string name="message_list_help_key">Del (or D) - Delete\u000AR -
|
<string name="message_list_help_key">Del (or D) - Delete\u000AR -
|
||||||
Reply\u000AA - Reply All\u000AC - Compose\u000AF - Forward\u000aM -
|
Reply\u000AA - Reply All\u000AC - Compose\u000AF - Forward\u000aM -
|
||||||
Move\u000AY - Copy\u000AG - Star\u000AO - Sort type\u000AI - Sort order\u000AQ
|
Move\u000AY - Copy\u000AG - Star\u000AO - Sort type\u000AI - Sort order\u000AQ
|
||||||
- Return to Accounts\u000AS - Select/deselect</string>
|
- Return to Folders\u000AS - Select/deselect</string>
|
||||||
|
|
||||||
|
<string name="folder_list_help_key">1 - Display only 1st Class folders\u000A
|
||||||
|
2 - Display 1st and 2nd Class folders\u000A
|
||||||
|
3 - Display all except 2nd Class folders\u000A
|
||||||
|
4 - Display all folders\u000A
|
||||||
|
Q - Return to Accounts\u000A
|
||||||
|
S - Edit Account Settings</string>
|
||||||
|
|
||||||
<string name="account_settings_signature__location_label">Signature position</string>
|
<string name="account_settings_signature__location_label">Signature position</string>
|
||||||
<string name="account_settings_signature__location_before_quoted_text">Before quoted messages</string>
|
<string name="account_settings_signature__location_before_quoted_text">Before quoted messages</string>
|
||||||
|
@ -19,12 +19,14 @@ import android.widget.*;
|
|||||||
import android.widget.AdapterView.AdapterContextMenuInfo;
|
import android.widget.AdapterView.AdapterContextMenuInfo;
|
||||||
import android.widget.AdapterView.OnItemClickListener;
|
import android.widget.AdapterView.OnItemClickListener;
|
||||||
import com.fsck.k9.*;
|
import com.fsck.k9.*;
|
||||||
|
import com.fsck.k9.Account.FolderMode;
|
||||||
import com.fsck.k9.activity.setup.AccountSettings;
|
import com.fsck.k9.activity.setup.AccountSettings;
|
||||||
import com.fsck.k9.activity.setup.FolderSettings;
|
import com.fsck.k9.activity.setup.FolderSettings;
|
||||||
import com.fsck.k9.mail.Folder;
|
import com.fsck.k9.mail.Folder;
|
||||||
import com.fsck.k9.mail.Message;
|
import com.fsck.k9.mail.Message;
|
||||||
import com.fsck.k9.mail.MessagingException;
|
import com.fsck.k9.mail.MessagingException;
|
||||||
import com.fsck.k9.mail.Store;
|
import com.fsck.k9.mail.Store;
|
||||||
|
import com.fsck.k9.service.MailService;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -368,16 +370,46 @@ public class FolderList extends K9ListActivity
|
|||||||
|
|
||||||
case KeyEvent.KEYCODE_H:
|
case KeyEvent.KEYCODE_H:
|
||||||
{
|
{
|
||||||
Toast toast = Toast.makeText(this, R.string.message_list_help_key, Toast.LENGTH_LONG);
|
Toast toast = Toast.makeText(this, R.string.folder_list_help_key, Toast.LENGTH_LONG);
|
||||||
toast.show();
|
toast.show();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case KeyEvent.KEYCODE_1:
|
||||||
|
{
|
||||||
|
setDisplayMode(FolderMode.FIRST_CLASS);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
case KeyEvent.KEYCODE_2:
|
||||||
|
{
|
||||||
|
setDisplayMode(FolderMode.FIRST_AND_SECOND_CLASS);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
case KeyEvent.KEYCODE_3:
|
||||||
|
{
|
||||||
|
setDisplayMode(FolderMode.NOT_SECOND_CLASS);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
case KeyEvent.KEYCODE_4:
|
||||||
|
{
|
||||||
|
setDisplayMode(FolderMode.ALL);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}//switch
|
}//switch
|
||||||
|
|
||||||
|
|
||||||
return super.onKeyDown(keyCode, event);
|
return super.onKeyDown(keyCode, event);
|
||||||
}//onKeyDown
|
}//onKeyDown
|
||||||
|
|
||||||
|
private void setDisplayMode(FolderMode newMode)
|
||||||
|
{
|
||||||
|
mAccount.setFolderDisplayMode(newMode);
|
||||||
|
mAccount.save(Preferences.getPreferences(this));
|
||||||
|
MailService.actionReschedule(this, null); // TODO: really should just refresh pushers
|
||||||
|
onRefresh(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void onRefresh(final boolean forceRemote)
|
private void onRefresh(final boolean forceRemote)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user