File tree Expand file tree Collapse file tree
src/main/java/me/rosuh/easywatermark Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change 11package me.rosuh.easywatermark.data.repo
22
33import android.graphics.Bitmap
4- import android.os.Build
54import androidx.datastore.core.DataStore
65import androidx.datastore.preferences.core.*
76import 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 ) {
Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff 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 () }
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ import androidx.palette.graphics.Palette
2020import dagger.hilt.android.AndroidEntryPoint
2121import me.rosuh.easywatermark.BuildConfig
2222import me.rosuh.easywatermark.databinding.ActivityAboutBinding
23- import me.rosuh.easywatermark.ui.dialog.ChangeLogDialogFragment
2423import 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 {
You can’t perform that action at this time.
0 commit comments