Updated on 2026-08-14

This commit is contained in:
Tangem 2024-12-30 17:35:40 +03:00
parent 743d40b28a
commit b4a6c07400
3 changed files with 25 additions and 0 deletions

View file

@ -90,6 +90,12 @@ class AppLogsStore @Inject constructor(
if (file.exists()) file.delete()
}
fun deleteLastLogFile() {
val file = File(applicationContext.filesDir, NEW_LOG_FILE_NAME)
if (file.exists()) file.delete()
}
private fun writeMessage(vararg messages: String) {
BufferedWriter(FileWriter(file, true)).use { writer ->
writer.append(formatter.print(DateTime.now()))

View file

@ -111,6 +111,8 @@ object PreferencesKeys {
val IS_GOOGLE_PAY_AVAILABLE_KEY by lazy { booleanPreferencesKey(name = "isGooglePayAvailable") }
val WAS_LOG_FILE_CLEARED by lazy { booleanPreferencesKey(name = "wasLogFileCleared") }
// region Permission
fun getShouldShowPermission(permission: String) = booleanPreferencesKey("shouldShowPushPermission_$permission")