0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 03:52:15 +02:00

Remove boolean check in onProgressUpdate of DeckPicker

(cherry picked from commit 28e97b2992)
This commit is contained in:
Shridhar 2021-06-03 21:31:56 +05:30 committed by Mike Hardy
parent 78ed572720
commit 8986586bc3
No known key found for this signature in database
GPG Key ID: 2FB9315A0E38FF42
2 changed files with 1 additions and 9 deletions

View File

@ -1827,13 +1827,7 @@ public class DeckPicker extends NavigationDrawerActivity implements
@Override
public void onProgressUpdate(Object... values) {
Resources res = getResources();
if (values[0] instanceof Boolean) {
// This is the part Download missing media of syncing
int total = (Integer) values[1];
int done = (Integer) values[2];
values[0] = (values[3]);
values[1] = res.getString(R.string.sync_downloading_media, done, total);
} else if (values[0] instanceof Integer) {
if (values[0] instanceof Integer) {
int id = (Integer) values[0];
if (id != 0) {
mCurrentMessage = res.getString(id);
@ -1850,7 +1844,6 @@ public class DeckPicker extends NavigationDrawerActivity implements
}
}
if (mProgressDialog != null && mProgressDialog.isShowing()) {
// mProgressDialog.setTitle((String) values[0]);
mProgressDialog.setContent(mCurrentMessage + "\n"
+ res
.getString(R.string.sync_up_down_size, mCountUp / 1024, mCountDown / 1024));

View File

@ -52,7 +52,6 @@
<string name="sync_uploading_message">Uploading…</string>
<string name="sync_downloading_message">Downloading…</string>
<string name="sync_title">Synchronization</string>
<string name="sync_downloading_media">Downloading media %1$d/%2$d…</string>
<string name="sync_log_uploading_message">Full sync from local</string>
<string name="sync_log_clocks_unsynchronized">Your clocks off by %1$d seconds%2$s. Make sure that the date, time, and timezone on your phone are set correctly, then sync again.</string>
<string name="sync_log_clocks_unsynchronized_tz">, the time zones possibly wrong</string>