Skip to content

Commit

Permalink
sync: only init icon at login (fixes #3187) (#3188)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
Okuro3499 and dogi authored Mar 5, 2024
1 parent ef459e4 commit c4801a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 21
targetSdkVersion 34
versionCode 1389
versionName "0.13.89"
versionCode 1390
versionName "0.13.90"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,12 @@ abstract class SyncActivity : ProcessUserDataActivity(), SyncListener, CheckVers
}

override fun onSyncFailed(s: String) {
syncIconDrawable = syncIcon.drawable as AnimationDrawable
syncIconDrawable.stop()
syncIconDrawable.selectDrawable(0)
syncIcon.invalidateDrawable(syncIconDrawable)
if (::syncIconDrawable.isInitialized) {
syncIconDrawable = syncIcon.drawable as AnimationDrawable
syncIconDrawable.stop()
syncIconDrawable.selectDrawable(0)
syncIcon.invalidateDrawable(syncIconDrawable)
}
runOnUiThread {
showAlert(this@SyncActivity, getString(R.string.sync_failed), s)
showWifiSettingDialog(this@SyncActivity)
Expand Down

0 comments on commit c4801a1

Please sign in to comment.