File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
app/src/main/java/com/lagradost/cloudstream3/utils Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,14 @@ import androidx.lifecycle.LiveData
55import com.lagradost.cloudstream3.mvvm.Resource
66
77/* *
8- * This is an atomic LiveData where you can do .value instantly after doing .postValue
8+ * This is an atomic LiveData where you can do .value instantly after doing .postValue.
9+ *
10+ * The default behavior is a footgun that will cause race conditions,
11+ * as we do not really care if it is posted as we only want the latest data (even in the binding).
912 *
1013 * Fuck all that is LiveData, because we want this value to be accessible everywhere instantly.
1114 * */
12- open class ConsistentLiveData <T >(initValue : T ? = null ) : LiveData<T>() {
15+ open class ConsistentLiveData <T >(initValue : T ? = null ) : LiveData<T>(initValue ) {
1316 @Volatile private var internalValue : T ? = initValue
1417
1518 override fun getValue (): T ? {
You can’t perform that action at this time.
0 commit comments