mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 19:27:25 +01:00
Minor edits
This commit is contained in:
parent
01dd46c5ed
commit
a5d9fb518a
@ -284,24 +284,26 @@ class MangaInfoController(private val fromSource: Boolean = false) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun toggleMangaInfo(context: Context) {
|
private fun toggleMangaInfo(context: Context) {
|
||||||
|
val isExpanded = binding.mangaInfoToggle.text == context.getString(R.string.manga_info_collapse)
|
||||||
|
|
||||||
binding.mangaInfoToggle.text =
|
binding.mangaInfoToggle.text =
|
||||||
if (binding.mangaInfoToggle.text == context.getString(R.string.manga_info_expand))
|
if (isExpanded)
|
||||||
context.getString(R.string.manga_info_collapse)
|
|
||||||
else
|
|
||||||
context.getString(R.string.manga_info_expand)
|
context.getString(R.string.manga_info_expand)
|
||||||
|
else
|
||||||
|
context.getString(R.string.manga_info_collapse)
|
||||||
|
|
||||||
with(binding.mangaSummary) {
|
with(binding.mangaSummary) {
|
||||||
maxLines =
|
maxLines =
|
||||||
if (maxLines == Int.MAX_VALUE)
|
if (isExpanded)
|
||||||
3
|
3
|
||||||
else
|
else
|
||||||
Int.MAX_VALUE
|
Int.MAX_VALUE
|
||||||
|
|
||||||
ellipsize =
|
ellipsize =
|
||||||
if (ellipsize == TextUtils.TruncateAt.END)
|
if (isExpanded)
|
||||||
null
|
|
||||||
else
|
|
||||||
TextUtils.TruncateAt.END
|
TextUtils.TruncateAt.END
|
||||||
|
else
|
||||||
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.mangaGenresTags.toggle()
|
binding.mangaGenresTags.toggle()
|
||||||
|
@ -206,15 +206,6 @@
|
|||||||
android:text="@string/add_to_library"
|
android:text="@string/add_to_library"
|
||||||
app:icon="@drawable/ic_add_to_library_24dp" />
|
app:icon="@drawable/ic_add_to_library_24dp" />
|
||||||
|
|
||||||
<!-- <com.google.android.material.button.MaterialButton-->
|
|
||||||
<!-- android:id="@+id/btn_tracking"-->
|
|
||||||
<!-- style="@style/Theme.Widget.Button.Icon"-->
|
|
||||||
<!-- android:layout_width="wrap_content"-->
|
|
||||||
<!-- android:layout_height="wrap_content"-->
|
|
||||||
<!-- android:layout_marginStart="8dp"-->
|
|
||||||
<!-- android:text="@string/manga_tracking_tab"-->
|
|
||||||
<!-- app:icon="@drawable/ic_sync_24dp" />-->
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btn_share"
|
android:id="@+id/btn_share"
|
||||||
style="@style/Theme.Widget.Button.Icon.Textless"
|
style="@style/Theme.Widget.Button.Icon.Textless"
|
||||||
|
Loading…
Reference in New Issue
Block a user