Remove source name from history cards, slightly compacter
This commit is contained in:
parent
b3611eef9d
commit
b17762f8d9
@ -10,8 +10,7 @@ import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder
|
|||||||
import eu.kanade.tachiyomi.util.lang.toTimestampString
|
import eu.kanade.tachiyomi.util.lang.toTimestampString
|
||||||
import java.util.Date
|
import java.util.Date
|
||||||
import kotlinx.android.synthetic.main.history_item.cover
|
import kotlinx.android.synthetic.main.history_item.cover
|
||||||
import kotlinx.android.synthetic.main.history_item.last_read
|
import kotlinx.android.synthetic.main.history_item.manga_subtitle
|
||||||
import kotlinx.android.synthetic.main.history_item.manga_source
|
|
||||||
import kotlinx.android.synthetic.main.history_item.manga_title
|
import kotlinx.android.synthetic.main.history_item.manga_title
|
||||||
import kotlinx.android.synthetic.main.history_item.remove
|
import kotlinx.android.synthetic.main.history_item.remove
|
||||||
import kotlinx.android.synthetic.main.history_item.resume
|
import kotlinx.android.synthetic.main.history_item.resume
|
||||||
@ -56,13 +55,10 @@ class HistoryHolder(
|
|||||||
// Set manga title
|
// Set manga title
|
||||||
manga_title.text = manga.title
|
manga_title.text = manga.title
|
||||||
|
|
||||||
// Set source + chapter title
|
// Set chapter number + timestamp
|
||||||
val formattedNumber = adapter.decimalFormat.format(chapter.chapter_number.toDouble())
|
val formattedNumber = adapter.decimalFormat.format(chapter.chapter_number.toDouble())
|
||||||
manga_source.text = itemView.context.getString(R.string.recent_manga_source)
|
manga_subtitle.text = itemView.context.getString(R.string.recent_manga_time)
|
||||||
.format(adapter.sourceManager.getOrStub(manga.source).toString(), formattedNumber)
|
.format(formattedNumber, Date(history.last_read).toTimestampString())
|
||||||
|
|
||||||
// Set last read timestamp title
|
|
||||||
last_read.text = Date(history.last_read).toTimestampString()
|
|
||||||
|
|
||||||
// Set cover
|
// Set cover
|
||||||
GlideApp.with(itemView.context).clear(cover)
|
GlideApp.with(itemView.context).clear(cover)
|
||||||
|
@ -5,15 +5,16 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="150dp"
|
android:layout_height="128dp"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/cover"
|
android:id="@+id/cover"
|
||||||
android:layout_width="100dp"
|
android:layout_width="85dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:contentDescription="@string/description_cover"
|
android:contentDescription="@string/description_cover"
|
||||||
|
android:focusable="true"
|
||||||
android:scaleType="centerCrop" />
|
android:scaleType="centerCrop" />
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
@ -35,18 +36,11 @@
|
|||||||
android:textAppearance="@style/TextAppearance.Medium.Title" />
|
android:textAppearance="@style/TextAppearance.Medium.Title" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/manga_source"
|
android:id="@+id/manga_subtitle"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/manga_title"
|
android:layout_below="@id/manga_title" />
|
||||||
android:textAppearance="@style/TextAppearance.Medium.Body2" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/last_read"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@id/manga_source"
|
|
||||||
android:textAppearance="@style/TextAppearance.Medium.Body2.Hint" />
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
@ -517,7 +517,7 @@
|
|||||||
<string name="updating_library">Updating library</string>
|
<string name="updating_library">Updating library</string>
|
||||||
|
|
||||||
<!-- History fragment -->
|
<!-- History fragment -->
|
||||||
<string name="recent_manga_source">%1$s - Ch.%2$s</string>
|
<string name="recent_manga_time">Ch. %1$s - %2$s</string>
|
||||||
|
|
||||||
<!-- Source migration screen -->
|
<!-- Source migration screen -->
|
||||||
<string name="migration_info">Tap to select the source to migrate from</string>
|
<string name="migration_info">Tap to select the source to migrate from</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user