Skip to content

Commit 559b079

Browse files
committed
Bumped build version to v2.4
1 parent 6940de8 commit 559b079

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on the Steamclock [Release Management Guide](https://github.com/steamclock/labs/wiki/Release-Management-Guide).
55

6-
## Unreleased
6+
## Jitpack v2.4 : Aug 15, 2023
77
- Allow more than one log to be attached to a Sentry report (#115)
88
- Fixed issue with log auto rotation (#115)
99
- Removed unused "track" code (#64)

steamclog/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ afterEvaluate {
1818
// You can then customize attributes of the publication as shown below.
1919
groupId = 'com.steamclock.steamclog'
2020
artifactId = 'release'
21-
version = 'v2.3'
21+
version = 'v2.4'
2222
}
2323
}
2424
}
@@ -37,8 +37,8 @@ android {
3737
defaultConfig {
3838
minSdkVersion 21
3939
targetSdkVersion versions.compileSdk
40-
versionCode 3
41-
versionName "2.2"
40+
versionCode 4
41+
versionName "2.4"
4242
consumerProguardFiles "consumer-rules.pro"
4343
}
4444

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.steamclock.steamclog
2+
3+
import android.content.Context
4+
import androidx.datastore.core.DataStore
5+
import androidx.datastore.preferences.preferencesDataStore
6+
import androidx.datastore.preferences.core.Preferences
7+
import androidx.datastore.preferences.core.booleanPreferencesKey
8+
import androidx.datastore.preferences.core.edit
9+
import kotlinx.coroutines.flow.Flow
10+
import kotlinx.coroutines.flow.map
11+
12+
/**
13+
* https://developer.android.com/topic/libraries/architecture/datastore
14+
*/
15+
class SClogDataStore(private val context: Context) {
16+
17+
companion object {
18+
private val Context.SClogDataStore: DataStore<Preferences> by preferencesDataStore(name = "SClogDataStore")
19+
private val hasLoggedFileCreationFailureKey = booleanPreferencesKey("has_logged_file_creation_failure")
20+
}
21+
22+
val getHasLoggedFileCreationFailure: Flow<Boolean>
23+
get() = context.SClogDataStore.data.map {
24+
it[hasLoggedFileCreationFailureKey] ?: true
25+
}
26+
27+
suspend fun setHasLoggedFileCreationFailure(value: Boolean) {
28+
context.SClogDataStore.edit { it[hasLoggedFileCreationFailureKey] = value }
29+
}
30+
}

0 commit comments

Comments
 (0)