From 63fec4f1f39d90df6f057641be38cf77fde975a1 Mon Sep 17 00:00:00 2001 From: Shubert Munthali Date: Wed, 24 Jul 2024 14:52:13 +0200 Subject: [PATCH] Minor fix --- .../arkmemo/preferences/MemoPreferences.kt | 2 +- .../arkmemo/preferences/MemoPreferencesImpl.kt | 12 +++--------- app/src/main/res/layout/dialog_donate_qr.xml | 2 +- app/src/main/res/layout/media_player_view.xml | 2 +- app/src/main/res/layout/note.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 6 files changed, 8 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/dev/arkbuilders/arkmemo/preferences/MemoPreferences.kt b/app/src/main/java/dev/arkbuilders/arkmemo/preferences/MemoPreferences.kt index 72083b2f..b0716ad8 100644 --- a/app/src/main/java/dev/arkbuilders/arkmemo/preferences/MemoPreferences.kt +++ b/app/src/main/java/dev/arkbuilders/arkmemo/preferences/MemoPreferences.kt @@ -9,7 +9,7 @@ interface MemoPreferences { fun getNotesStorage(): Path - fun storeCrashReportEnabled(bool: Boolean) + fun storeCrashReportEnabled(enabled: Boolean) fun getCrashReportEnabled(): Boolean } \ No newline at end of file diff --git a/app/src/main/java/dev/arkbuilders/arkmemo/preferences/MemoPreferencesImpl.kt b/app/src/main/java/dev/arkbuilders/arkmemo/preferences/MemoPreferencesImpl.kt index f49123f0..df2da511 100644 --- a/app/src/main/java/dev/arkbuilders/arkmemo/preferences/MemoPreferencesImpl.kt +++ b/app/src/main/java/dev/arkbuilders/arkmemo/preferences/MemoPreferencesImpl.kt @@ -18,21 +18,15 @@ class MemoPreferencesImpl @Inject constructor(@ApplicationContext context: Conte private val prefEditor = sharedPreferences.edit() override fun storePath(path: String) { - prefEditor.apply { - putString(CURRENT_NOTES_PATH, path) - apply() - } + prefEditor.putString(CURRENT_NOTES_PATH, path).apply() } override fun getPath(): String = sharedPreferences.getString(CURRENT_NOTES_PATH, "") ?: "" override fun getNotesStorage(): Path = Path(getPath()) - override fun storeCrashReportEnabled(bool: Boolean) { - prefEditor.apply { - putBoolean(CRASH_REPORT_ENABLE, bool) - apply() - } + override fun storeCrashReportEnabled(enabled: Boolean) { + prefEditor.putBoolean(CRASH_REPORT_ENABLE, enabled).apply() } override fun getCrashReportEnabled(): Boolean = sharedPreferences.getBoolean(CRASH_REPORT_ENABLE, true) diff --git a/app/src/main/res/layout/dialog_donate_qr.xml b/app/src/main/res/layout/dialog_donate_qr.xml index 93e0f7e5..efbabd9c 100644 --- a/app/src/main/res/layout/dialog_donate_qr.xml +++ b/app/src/main/res/layout/dialog_donate_qr.xml @@ -71,7 +71,7 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toStartOf="@+id/layout_copy" - android:layout_marginVertical="12dp" + android:layout_marginVertical="8dp" android:layout_marginHorizontal="12dp" android:lines="1" android:ellipsize="middle" diff --git a/app/src/main/res/layout/media_player_view.xml b/app/src/main/res/layout/media_player_view.xml index fa0a9531..2dfba8c3 100644 --- a/app/src/main/res/layout/media_player_view.xml +++ b/app/src/main/res/layout/media_player_view.xml @@ -40,7 +40,7 @@ android:layout_width="100dp" android:layout_height="100dp" android:layout_marginTop="25dp" - android:contentDescription="@string/ark_memo_play" + android:contentDescription="@string/ark_memo_play_pause" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/seek_bar" diff --git a/app/src/main/res/layout/note.xml b/app/src/main/res/layout/note.xml index 90cf2c80..7bcf50a6 100644 --- a/app/src/main/res/layout/note.xml +++ b/app/src/main/res/layout/note.xml @@ -52,7 +52,7 @@ android:layout_margin="5dp" android:background="@null" android:visibility="gone" - android:contentDescription="@string/ark_memo_play" + android:contentDescription="@string/ark_memo_play_pause" android:src="@drawable/ic_play" app:tint="@color/purple_700" /> QR saved at %s Will be available soon! Invalid recording file - Play + Play/Pause \ No newline at end of file