mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 03:41:50 +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 DownloadAdapter adapter;
|
||||||
|
|
||||||
private MenuItem startButton;
|
private MenuItem startButton;
|
||||||
private MenuItem stopButton;
|
private MenuItem pauseButton;
|
||||||
|
|
||||||
private Subscription queueStatusSubscription;
|
private Subscription queueStatusSubscription;
|
||||||
private boolean isRunning;
|
private boolean isRunning;
|
||||||
@ -64,11 +64,11 @@ public class DownloadFragment extends BaseRxFragment<DownloadPresenter> {
|
|||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
inflater.inflate(R.menu.download_queue, menu);
|
inflater.inflate(R.menu.download_queue, menu);
|
||||||
startButton = menu.findItem(R.id.start_queue);
|
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
|
// Menu seems to be inflated after onResume in fragments, so we initialize them here
|
||||||
startButton.setVisible(!isRunning && !getPresenter().downloadManager.getQueue().isEmpty());
|
startButton.setVisible(!isRunning && !getPresenter().downloadManager.getQueue().isEmpty());
|
||||||
stopButton.setVisible(isRunning);
|
pauseButton.setVisible(isRunning);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -77,7 +77,7 @@ public class DownloadFragment extends BaseRxFragment<DownloadPresenter> {
|
|||||||
case R.id.start_queue:
|
case R.id.start_queue:
|
||||||
DownloadService.start(getActivity());
|
DownloadService.start(getActivity());
|
||||||
break;
|
break;
|
||||||
case R.id.stop_queue:
|
case R.id.pause_queue:
|
||||||
DownloadService.stop(getActivity());
|
DownloadService.stop(getActivity());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -101,8 +101,8 @@ public class DownloadFragment extends BaseRxFragment<DownloadPresenter> {
|
|||||||
isRunning = running;
|
isRunning = running;
|
||||||
if (startButton != null)
|
if (startButton != null)
|
||||||
startButton.setVisible(!running && !getPresenter().downloadManager.getQueue().isEmpty());
|
startButton.setVisible(!running && !getPresenter().downloadManager.getQueue().isEmpty());
|
||||||
if (stopButton != null)
|
if (pauseButton != null)
|
||||||
stopButton.setVisible(running);
|
pauseButton.setVisible(running);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createAdapter() {
|
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"
|
android:visible="false"
|
||||||
app:showAsAction="ifRoom"/>
|
app:showAsAction="ifRoom"/>
|
||||||
|
|
||||||
<item android:title="@string/action_stop"
|
<item android:title="@string/action_pause"
|
||||||
android:id="@+id/stop_queue"
|
android:id="@+id/pause_queue"
|
||||||
android:icon="@drawable/ic_stop"
|
android:icon="@drawable/ic_pause"
|
||||||
android:visible="false"
|
android:visible="false"
|
||||||
app:showAsAction="ifRoom"/>
|
app:showAsAction="ifRoom"/>
|
||||||
|
|
||||||
|
@ -35,12 +35,12 @@
|
|||||||
<string name="action_next_unread">Next unread</string>
|
<string name="action_next_unread">Next unread</string>
|
||||||
<string name="action_start">Start</string>
|
<string name="action_start">Start</string>
|
||||||
<string name="action_stop">Stop</string>
|
<string name="action_stop">Stop</string>
|
||||||
|
<string name="action_pause">Pause</string>
|
||||||
<string name="action_previous_chapter">Previous chapter</string>
|
<string name="action_previous_chapter">Previous chapter</string>
|
||||||
<string name="action_next_chapter">Next chapter</string>
|
<string name="action_next_chapter">Next chapter</string>
|
||||||
<string name="action_retry">Retry</string>
|
<string name="action_retry">Retry</string>
|
||||||
<string name="action_display_mode">Change display mode</string>
|
<string name="action_display_mode">Change display mode</string>
|
||||||
|
|
||||||
|
|
||||||
<!-- Buttons -->
|
<!-- Buttons -->
|
||||||
<string name="button_ok">OK</string>
|
<string name="button_ok">OK</string>
|
||||||
<string name="button_cancel">Cancel</string>
|
<string name="button_cancel">Cancel</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user