You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Cleanup RvItems
This commit is contained in:
@@ -4,12 +4,15 @@ import androidx.databinding.Bindable
|
||||
import com.topjohnwu.magisk.BR
|
||||
import com.topjohnwu.magisk.R
|
||||
import com.topjohnwu.magisk.core.model.su.SuLog
|
||||
import com.topjohnwu.magisk.databinding.ObservableItem
|
||||
import com.topjohnwu.magisk.databinding.ObservableDiffRvItem
|
||||
import com.topjohnwu.magisk.databinding.RvContainer
|
||||
import com.topjohnwu.magisk.ktx.timeDateFormat
|
||||
import com.topjohnwu.magisk.ktx.toTime
|
||||
import com.topjohnwu.magisk.utils.set
|
||||
|
||||
class LogRvItem(val item: SuLog) : ObservableItem<LogRvItem>() {
|
||||
class LogRvItem(
|
||||
override val item: SuLog
|
||||
) : ObservableDiffRvItem<LogRvItem>(), RvContainer<SuLog> {
|
||||
|
||||
override val layoutRes = R.layout.item_log_access_md2
|
||||
|
||||
@@ -24,14 +27,4 @@ class LogRvItem(val item: SuLog) : ObservableItem<LogRvItem>() {
|
||||
set(value) = set(value, field, { field = it }, BR.bottom)
|
||||
|
||||
override fun itemSameAs(other: LogRvItem) = item.appName == other.item.appName
|
||||
|
||||
override fun contentSameAs(other: LogRvItem) = item.fromUid == other.item.fromUid &&
|
||||
item.toUid == other.item.toUid &&
|
||||
item.fromPid == other.item.fromPid &&
|
||||
item.packageName == other.item.packageName &&
|
||||
item.command == other.item.command &&
|
||||
item.action == other.item.action &&
|
||||
item.time == other.item.time &&
|
||||
isTop == other.isTop &&
|
||||
isBottom == other.isBottom
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user