1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-11-16 14:54:57 +00:00

Reorder buttons in clear downloads dialog

This commit is contained in:
Kamil Szczęk 2019-12-26 16:15:30 +01:00
parent e4295fb3fa
commit 986acc5fc5
3 changed files with 7 additions and 6 deletions

View File

@ -190,11 +190,12 @@ public class MissionsFragment extends Fragment {
return true; return true;
case R.id.clear_list: case R.id.clear_list:
AlertDialog.Builder prompt = new AlertDialog.Builder(mContext); AlertDialog.Builder prompt = new AlertDialog.Builder(mContext);
prompt.setTitle(R.string.clear_finished_download); prompt.setTitle(R.string.clear_download_history);
prompt.setMessage(R.string.confirm_prompt); prompt.setMessage(R.string.confirm_prompt);
prompt.setPositiveButton(R.string.clear_finished_download, (dialog, which) -> mAdapter.clearFinishedDownloads(false)); // Intentionally misusing button's purpose in order to achieve good order
prompt.setNeutralButton(R.string.delete_downloaded_files, (dialog, which) -> mAdapter.clearFinishedDownloads(true)); prompt.setNegativeButton(R.string.clear_download_history, (dialog, which) -> mAdapter.clearFinishedDownloads(false));
prompt.setNegativeButton(R.string.cancel, null); prompt.setPositiveButton(R.string.delete_downloaded_files, (dialog, which) -> mAdapter.clearFinishedDownloads(true));
prompt.setNeutralButton(R.string.cancel, null);
prompt.create().show(); prompt.create().show();
return true; return true;
case R.id.start_downloads: case R.id.start_downloads:

View File

@ -24,7 +24,7 @@
<item android:id="@+id/clear_list" <item android:id="@+id/clear_list"
android:visible="false" android:visible="false"
android:icon="?attr/ic_delete" android:icon="?attr/ic_delete"
android:title="@string/clear_finished_download" android:title="@string/clear_download_history"
app:showAsAction="ifRoom" /> app:showAsAction="ifRoom" />
<item android:id="@+id/action_settings" <item android:id="@+id/action_settings"

View File

@ -569,7 +569,7 @@
<string name="error_progress_lost">Progress lost, because the file was deleted</string> <string name="error_progress_lost">Progress lost, because the file was deleted</string>
<string name="error_timeout">Connection timeout</string> <string name="error_timeout">Connection timeout</string>
<string name="error_download_resource_gone">Cannot recover this download</string> <string name="error_download_resource_gone">Cannot recover this download</string>
<string name="clear_finished_download">Clear finished downloads</string> <string name="clear_download_history">Clear download history</string>
<string name="confirm_prompt">Do you want to clear your download history or delete all downloaded files?</string> <string name="confirm_prompt">Do you want to clear your download history or delete all downloaded files?</string>
<string name="stop">Stop</string> <string name="stop">Stop</string>
<string name="max_retry_msg">Maximum retries</string> <string name="max_retry_msg">Maximum retries</string>