cleaner code
This commit is contained in:
@@ -248,10 +248,8 @@ object LocalPreferences {
|
||||
withContext(Dispatchers.IO) {
|
||||
val prefsDir = File(prefsDirPath)
|
||||
prefsDir.list()?.forEach {
|
||||
if (it.contains(npub)) {
|
||||
if (!File(prefsDir, it).delete()) {
|
||||
Log.w("LocalPreferences", "Failed to delete preference file: $it")
|
||||
}
|
||||
if (it.contains(npub) && !File(prefsDir, it).delete()) {
|
||||
Log.w("LocalPreferences", "Failed to delete preference file: $it")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-1
@@ -972,7 +972,6 @@ open class ShortNotePostViewModel :
|
||||
val uploadErrorTitle = stringRes(appContext, R.string.upload_error_title)
|
||||
val uploadVoiceNip95NotSupported = stringRes(appContext, R.string.upload_error_voice_message_nip95_not_supported)
|
||||
val uploadVoiceFailed = stringRes(appContext, R.string.upload_error_voice_message_failed)
|
||||
val uploadVoiceUnexpected = stringRes(appContext, R.string.upload_error_voice_message_unexpected_state)
|
||||
val uploadVoiceExceptionMessage: (String) -> String = { detail ->
|
||||
stringRes(appContext, R.string.upload_error_voice_message_exception, detail)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user