Show "Start" in chapters FAB if nothing is read yet
This commit is contained in:
parent
6ad3fcb91d
commit
f9baff0e90
@ -284,6 +284,11 @@ class ChaptersController :
|
|||||||
}
|
}
|
||||||
actionMode?.invalidate()
|
actionMode?.invalidate()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val context = view?.context
|
||||||
|
if (context != null && chapters.any { it.read }) {
|
||||||
|
binding.fab.text = context.getString(R.string.action_resume)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun fetchChaptersFromSource(manualFetch: Boolean = false) {
|
private fun fetchChaptersFromSource(manualFetch: Boolean = false) {
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/fab"
|
android:id="@+id/fab"
|
||||||
style="@style/Theme.Widget.FAB"
|
style="@style/Theme.Widget.FAB"
|
||||||
android:text="@string/action_resume"
|
android:text="@string/action_start"
|
||||||
app:icon="@drawable/ic_play_arrow_24dp"
|
app:icon="@drawable/ic_play_arrow_24dp"
|
||||||
app:layout_anchor="@id/recycler" />
|
app:layout_anchor="@id/recycler" />
|
||||||
|
|
||||||
|
@ -76,6 +76,7 @@
|
|||||||
<string name="action_next_chapter">Next chapter</string>
|
<string name="action_next_chapter">Next chapter</string>
|
||||||
<string name="action_retry">Retry</string>
|
<string name="action_retry">Retry</string>
|
||||||
<string name="action_remove">Remove</string>
|
<string name="action_remove">Remove</string>
|
||||||
|
<string name="action_start">Start</string>
|
||||||
<string name="action_resume">Resume</string>
|
<string name="action_resume">Resume</string>
|
||||||
<string name="action_move">Move</string>
|
<string name="action_move">Move</string>
|
||||||
<string name="action_open_in_browser">Open in browser</string>
|
<string name="action_open_in_browser">Open in browser</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user