Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shubertm authored and tuancoltech committed Jul 28, 2024
1 parent 0cf9136 commit 63fec4f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface MemoPreferences {

fun getNotesStorage(): Path

fun storeCrashReportEnabled(bool: Boolean)
fun storeCrashReportEnabled(enabled: Boolean)

fun getCrashReportEnabled(): Boolean
}
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/dialog_donate_qr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/media_player_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/note.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
<ImageButton
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@
<string name="toast_save_qr_success">QR saved at %s</string>
<string name="tips_will_be_available_soon">Will be available soon!</string>
<string name="toast_invalid_recording">Invalid recording file</string>
<string name="ark_memo_play">Play</string>
<string name="ark_memo_play_pause">Play/Pause</string>

</resources>

0 comments on commit 63fec4f

Please sign in to comment.