Fragmentless GalleryDetailScene (#202)

* Initial fragmentless port

* Compile it

* Refine

* Refine

* All

* Fix

---------

Co-authored-by: Lokesh Gidra <lokeshgidra@google.com>
This commit is contained in:
nullArrayListandLokesh Gidra authored and GitHub committed 2023-11-07 15:39:59 +08:00
1 parent 2d7b024293
commit 703d63d106
2 files changed
+1005 -1219

No files matched your search

@@ -16,6 +16,7 @@
package com.hippo.ehviewer.client.data
import java.util.regex.Pattern
import moe.tarsin.kt.unreachable
interface GalleryInfo {
var gid: Long
@@ -133,3 +134,15 @@ interface GalleryInfo {
const val LOCAL_FAVORITED = -1
}
}
fun GalleryInfo.findBaseInfo(): BaseGalleryInfo {
return when (this) {
is BaseGalleryInfo -> this
is GalleryDetail -> galleryInfo
else -> unreachable()
}
}
fun GalleryInfo.asGalleryDetail(): GalleryDetail? {
return this as? GalleryDetail
}
File diff suppressed because it is too large. Load diff