mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-28 09:02:08 +03:00
Remove source name from history cards, slightly compacter
This commit is contained in:
parent
b3611eef9d
commit
b17762f8d9
3 changed files with 10 additions and 20 deletions
|
@ -10,8 +10,7 @@ import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder
|
|||
import eu.kanade.tachiyomi.util.lang.toTimestampString
|
||||
import java.util.Date
|
||||
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_source
|
||||
import kotlinx.android.synthetic.main.history_item.manga_subtitle
|
||||
import kotlinx.android.synthetic.main.history_item.manga_title
|
||||
import kotlinx.android.synthetic.main.history_item.remove
|
||||
import kotlinx.android.synthetic.main.history_item.resume
|
||||
|
@ -56,13 +55,10 @@ class HistoryHolder(
|
|||
// Set manga title
|
||||
manga_title.text = manga.title
|
||||
|
||||
// Set source + chapter title
|
||||
// Set chapter number + timestamp
|
||||
val formattedNumber = adapter.decimalFormat.format(chapter.chapter_number.toDouble())
|
||||
manga_source.text = itemView.context.getString(R.string.recent_manga_source)
|
||||
.format(adapter.sourceManager.getOrStub(manga.source).toString(), formattedNumber)
|
||||
|
||||
// Set last read timestamp title
|
||||
last_read.text = Date(history.last_read).toTimestampString()
|
||||
manga_subtitle.text = itemView.context.getString(R.string.recent_manga_time)
|
||||
.format(formattedNumber, Date(history.last_read).toTimestampString())
|
||||
|
||||
// Set cover
|
||||
GlideApp.with(itemView.context).clear(cover)
|
||||
|
|
|
@ -5,15 +5,16 @@
|
|||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150dp"
|
||||
android:layout_height="128dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/cover"
|
||||
android:layout_width="100dp"
|
||||
android:layout_width="85dp"
|
||||
android:layout_height="match_parent"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/description_cover"
|
||||
android:focusable="true"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
<RelativeLayout
|
||||
|
@ -35,18 +36,11 @@
|
|||
android:textAppearance="@style/TextAppearance.Medium.Title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/manga_source"
|
||||
android:id="@+id/manga_subtitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/manga_title"
|
||||
android:textAppearance="@style/TextAppearance.Medium.Body2" />
|
||||
android:layout_below="@id/manga_title" />
|
||||
|
||||
<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>
|
||||
|
||||
<Button
|
||||
|
|
|
@ -517,7 +517,7 @@
|
|||
<string name="updating_library">Updating library</string>
|
||||
|
||||
<!-- 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 -->
|
||||
<string name="migration_info">Tap to select the source to migrate from</string>
|
||||
|
|
Loading…
Reference in a new issue