mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Rename export action and move to overflow menu
This commit is contained in:
@@ -60,7 +60,7 @@ public class ShowHabitsMenu extends BaseMenu
|
||||
this.exportCSVFactory = exportCSVFactory;
|
||||
}
|
||||
|
||||
public void downloadHabit()
|
||||
public void exportHabit()
|
||||
{
|
||||
List<Habit> selected = new LinkedList<>();
|
||||
selected.add(habit);
|
||||
@@ -80,8 +80,8 @@ public class ShowHabitsMenu extends BaseMenu
|
||||
screen.showEditHabitDialog();
|
||||
return true;
|
||||
|
||||
case R.id.download:
|
||||
this.downloadHabit();
|
||||
case R.id.export:
|
||||
this.exportHabit();
|
||||
return true;
|
||||
|
||||
default:
|
||||
|
||||
@@ -22,10 +22,9 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/download"
|
||||
android:icon="?iconDownload"
|
||||
android:title="@string/download"
|
||||
app:showAsAction="ifRoom"/>
|
||||
android:id="@+id/export"
|
||||
android:title="@string/export"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_edit_habit"
|
||||
|
||||
@@ -203,4 +203,5 @@
|
||||
<string name="by_color">By color</string>
|
||||
<string name="by_score">By score</string>
|
||||
<string name="download">Download</string>
|
||||
<string name="export">Export</string>
|
||||
</resources>
|
||||
@@ -61,7 +61,7 @@ public class ShowHabitsMenuTest extends BaseUnitTest
|
||||
@Test
|
||||
public void testOnDownloadHabit()
|
||||
{
|
||||
onItemSelected(R.id.download);
|
||||
onItemSelected(R.id.export);
|
||||
verify(taskRunner).execute(any());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user