mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 17:59:18 +01:00
Change stop to pause in download queue view
This commit is contained in:
parent
6c069ad87b
commit
4be0b2502e
@ -29,7 +29,7 @@ public class DownloadFragment extends BaseRxFragment<DownloadPresenter> {
|
||||
private DownloadAdapter adapter;
|
||||
|
||||
private MenuItem startButton;
|
||||
private MenuItem stopButton;
|
||||
private MenuItem pauseButton;
|
||||
|
||||
private Subscription queueStatusSubscription;
|
||||
private boolean isRunning;
|
||||
@ -64,11 +64,11 @@ public class DownloadFragment extends BaseRxFragment<DownloadPresenter> {
|
||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||
inflater.inflate(R.menu.download_queue, menu);
|
||||
startButton = menu.findItem(R.id.start_queue);
|
||||
stopButton = menu.findItem(R.id.stop_queue);
|
||||
pauseButton = menu.findItem(R.id.pause_queue);
|
||||
|
||||
// Menu seems to be inflated after onResume in fragments, so we initialize them here
|
||||
startButton.setVisible(!isRunning && !getPresenter().downloadManager.getQueue().isEmpty());
|
||||
stopButton.setVisible(isRunning);
|
||||
pauseButton.setVisible(isRunning);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -77,7 +77,7 @@ public class DownloadFragment extends BaseRxFragment<DownloadPresenter> {
|
||||
case R.id.start_queue:
|
||||
DownloadService.start(getActivity());
|
||||
break;
|
||||
case R.id.stop_queue:
|
||||
case R.id.pause_queue:
|
||||
DownloadService.stop(getActivity());
|
||||
break;
|
||||
}
|
||||
@ -101,8 +101,8 @@ public class DownloadFragment extends BaseRxFragment<DownloadPresenter> {
|
||||
isRunning = running;
|
||||
if (startButton != null)
|
||||
startButton.setVisible(!running && !getPresenter().downloadManager.getQueue().isEmpty());
|
||||
if (stopButton != null)
|
||||
stopButton.setVisible(running);
|
||||
if (pauseButton != null)
|
||||
pauseButton.setVisible(running);
|
||||
}
|
||||
|
||||
private void createAdapter() {
|
||||
|
BIN
app/src/main/res/drawable-hdpi/ic_pause.png
Normal file
BIN
app/src/main/res/drawable-hdpi/ic_pause.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 105 B |
BIN
app/src/main/res/drawable-ldpi/ic_pause.png
Normal file
BIN
app/src/main/res/drawable-ldpi/ic_pause.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 95 B |
BIN
app/src/main/res/drawable-mdpi/ic_pause.png
Normal file
BIN
app/src/main/res/drawable-mdpi/ic_pause.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 83 B |
BIN
app/src/main/res/drawable-xhdpi/ic_pause.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_pause.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 90 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_pause.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_pause.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 92 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_pause.png
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/ic_pause.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 94 B |
@ -8,9 +8,9 @@
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom"/>
|
||||
|
||||
<item android:title="@string/action_stop"
|
||||
android:id="@+id/stop_queue"
|
||||
android:icon="@drawable/ic_stop"
|
||||
<item android:title="@string/action_pause"
|
||||
android:id="@+id/pause_queue"
|
||||
android:icon="@drawable/ic_pause"
|
||||
android:visible="false"
|
||||
app:showAsAction="ifRoom"/>
|
||||
|
||||
|
@ -35,12 +35,12 @@
|
||||
<string name="action_next_unread">Next unread</string>
|
||||
<string name="action_start">Start</string>
|
||||
<string name="action_stop">Stop</string>
|
||||
<string name="action_pause">Pause</string>
|
||||
<string name="action_previous_chapter">Previous chapter</string>
|
||||
<string name="action_next_chapter">Next chapter</string>
|
||||
<string name="action_retry">Retry</string>
|
||||
<string name="action_display_mode">Change display mode</string>
|
||||
|
||||
|
||||
<!-- Buttons -->
|
||||
<string name="button_ok">OK</string>
|
||||
<string name="button_cancel">Cancel</string>
|
||||
|
Loading…
Reference in New Issue
Block a user