Skip to content

Commit 21c2dcd

Browse files
committed
🔖
[Update] - Remove change log dialog. - Bump up the version. Signed-off-by: rosuH <hi@rosuh.me>
1 parent 804170c commit 21c2dcd

5 files changed

Lines changed: 3 additions & 27 deletions

File tree

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ android {
1515
applicationId = "me.rosuh.easywatermark"
1616
minSdk = (Apps.minSdk)
1717
targetSdk = (Apps.targetSdk)
18-
versionCode = 20601
19-
versionName = "2.6.1"
18+
versionCode = 20602
19+
versionName = "2.6.2"
2020
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2121
setProperty("archivesBaseName", "$applicationId-v$versionName($versionCode)")
2222
}

app/src/main/java/me/rosuh/easywatermark/data/repo/UserConfigRepository.kt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package me.rosuh.easywatermark.data.repo
22

33
import android.graphics.Bitmap
4-
import android.os.Build
54
import androidx.datastore.core.DataStore
65
import androidx.datastore.preferences.core.*
76
import kotlinx.coroutines.flow.Flow
@@ -49,18 +48,6 @@ class UserConfigRepository @Inject constructor(
4948
UserPreferences(outputFormat, compressLevel)
5049
}
5150

52-
val changeLogFlow: Flow<String> = dataStore.data
53-
.catch { exception ->
54-
if (exception is IOException) {
55-
emit(emptyPreferences())
56-
} else {
57-
throw exception
58-
}
59-
}
60-
.map {
61-
it[KEY_CHANGE_LOG] ?: ""
62-
}
63-
6451
suspend fun updateFormat(
6552
outputFormat: Bitmap.CompressFormat
6653
) {

app/src/main/java/me/rosuh/easywatermark/ui/MainActivity.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -300,13 +300,6 @@ class MainActivity : AppCompatActivity() {
300300
}
301301
}
302302

303-
viewModel.isNeedShowUpgradeInfo.observe(this) {
304-
val needShow = it ?: false
305-
if (!needShow) return@observe
306-
ChangeLogDialogFragment.safetyShow(this@MainActivity.supportFragmentManager)
307-
viewModel.saveUpgradeInfo()
308-
}
309-
310303
viewModel.colorPalette.observe(this) { palette ->
311304
val bgColor = palette.bgColor(this)
312305
val titleTextColor = palette.titleTextColor(this)

app/src/main/java/me/rosuh/easywatermark/ui/MainViewModel.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ class MainViewModel @Inject constructor(
7878
val compressLevel: Int
7979
get() = userPreferences.value.compressLevel
8080

81-
val isNeedShowUpgradeInfo: LiveData<Boolean> =
82-
userRepo.changeLogFlow.map { it != BuildConfig.VERSION_CODE.toString() }.asLiveData()
83-
8481
val colorPalette: MutableLiveData<Palette> = MutableLiveData()
8582

8683
private val tmpDrawableBounds by lazy { Rect() }

app/src/main/java/me/rosuh/easywatermark/ui/about/AboutActivity.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import androidx.palette.graphics.Palette
2020
import dagger.hilt.android.AndroidEntryPoint
2121
import me.rosuh.easywatermark.BuildConfig
2222
import me.rosuh.easywatermark.databinding.ActivityAboutBinding
23-
import me.rosuh.easywatermark.ui.dialog.ChangeLogDialogFragment
2423
import me.rosuh.easywatermark.utils.ktx.*
2524

2625
@AndroidEntryPoint
@@ -77,7 +76,7 @@ class AboutActivity : AppCompatActivity() {
7776
openLink("https://github.com/rosuH/EasyWatermark/issues/new")
7877
}
7978
tvChangeLog.setOnClickListener {
80-
ChangeLogDialogFragment.safetyShow(supportFragmentManager)
79+
openLink("https://github.com/rosuH/EasyWatermark/releases/")
8180
}
8281
tvOpenSource.setOnClickListener {
8382
kotlin.runCatching {

0 commit comments

Comments
 (0)