mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-23 18:02:15 -05:00
When no messages are selected yet, "Select all" is the only valid batch
option. Instead of forcing the user through a submenu, show "Select all" instead of the submenu
This commit is contained in:
parent
ea6bb0000e
commit
a59ade4fdd
BIN
res/drawable/ic_menu_select_all.png
Normal file
BIN
res/drawable/ic_menu_select_all.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
@ -37,6 +37,10 @@
|
|||||||
/>
|
/>
|
||||||
</menu>
|
</menu>
|
||||||
</item>
|
</item>
|
||||||
|
<item
|
||||||
|
android:id="@+id/select_all"
|
||||||
|
android:title="@string/batch_select_all"
|
||||||
|
android:icon="@drawable/ic_menu_select_all"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/batch_ops"
|
android:id="@+id/batch_ops"
|
||||||
android:title="@string/batch_ops"
|
android:title="@string/batch_ops"
|
||||||
|
@ -1153,6 +1153,7 @@ public class MessageList
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
case R.id.select_all:
|
||||||
case R.id.batch_select_all:
|
case R.id.batch_select_all:
|
||||||
setAllSelected(true);
|
setAllSelected(true);
|
||||||
toggleBatchButtons();
|
toggleBatchButtons();
|
||||||
@ -1271,6 +1272,10 @@ public class MessageList
|
|||||||
public boolean onPrepareOptionsMenu(Menu menu)
|
public boolean onPrepareOptionsMenu(Menu menu)
|
||||||
{
|
{
|
||||||
boolean anySelected = anySelected();
|
boolean anySelected = anySelected();
|
||||||
|
|
||||||
|
menu.findItem(R.id.select_all).setVisible(! anySelected);
|
||||||
|
menu.findItem(R.id.batch_ops).setVisible(anySelected);
|
||||||
|
|
||||||
setOpsState(menu, true, anySelected);
|
setOpsState(menu, true, anySelected);
|
||||||
|
|
||||||
if (mQueryString != null)
|
if (mQueryString != null)
|
||||||
|
Loading…
Reference in New Issue
Block a user