1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-09-19 23:21:34 +02:00
This commit is contained in:
Allan Wang 2021-04-18 18:17:26 -07:00
parent c1d34aeaee
commit 997362de5a
No known key found for this signature in database
GPG Key ID: 69D90B885D405BDB

View File

@ -83,7 +83,7 @@ abstract class BaseFragment :
ARG_URL to d.url,
ARG_POSITION to position
)
d.put(fragment.arguments!!)
d.put(fragment.requireArguments())
return fragment
}
}
@ -104,15 +104,15 @@ abstract class BaseFragment :
override val coroutineContext: CoroutineContext
get() = ContextHelper.dispatcher + job
override val baseUrl: String by lazy { arguments!!.getString(ARG_URL)!! }
override val baseUrl: String by lazy { requireArguments().getString(ARG_URL)!! }
override val baseEnum: FbItem by lazy { FbItem[arguments]!! }
override val position: Int by lazy { arguments!!.getInt(ARG_POSITION) }
override val position: Int by lazy { requireArguments().getInt(ARG_POSITION) }
override var valid: Boolean
get() = arguments!!.getBoolean(ARG_VALID, true)
get() = requireArguments().getBoolean(ARG_VALID, true)
set(value) {
if (!isActive || value || this is WebFragment) return
arguments!!.putBoolean(ARG_VALID, value)
requireArguments().putBoolean(ARG_VALID, value)
frostEvent(
"Native Fallback",
"Item" to baseEnum.name