Skip to content

Commit

Permalink
Remove boolean check in onProgressUpdate of DeckPicker
Browse files Browse the repository at this point in the history
  • Loading branch information
ShridharGoel authored and mikehardy committed Jun 20, 2021
1 parent 4c61998 commit 28e97b2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
9 changes: 1 addition & 8 deletions AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.java
Original file line number Diff line number Diff line change
Expand Up @@ -1827,13 +1827,7 @@ public void onPreExecute() {
@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);
Expand All @@ -1850,7 +1844,6 @@ public void onProgressUpdate(Object... values) {
}
}
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));
Expand Down
1 change: 0 additions & 1 deletion AnkiDroid/src/main/res/values/04-network.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 clock’s 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 zone’s possibly wrong</string>
Expand Down

0 comments on commit 28e97b2

Please sign in to comment.