This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.applogics.scrabble.core.common.utils.RequestFlowManager.RequestState | |
| import kotlinx.coroutines.CoroutineDispatcher | |
| import kotlinx.coroutines.CoroutineScope | |
| import kotlinx.coroutines.Dispatchers | |
| import kotlinx.coroutines.FlowPreview | |
| import kotlinx.coroutines.flow.Flow | |
| import kotlinx.coroutines.flow.MutableStateFlow | |
| import kotlinx.coroutines.flow.SharingStarted | |
| import kotlinx.coroutines.flow.debounce | |
| import kotlinx.coroutines.flow.distinctUntilChanged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class NetworkLiveData constructor(private val context: Context?) : LiveData<Boolean>() { | |
| private lateinit var networkConnectionBroadcastReceiver: NetworkConnectionBroadcastReceiver | |
| override fun onActive() { | |
| registerReceiver() | |
| } | |
| override fun onInactive() { | |
| unRegisterReceiver() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.annotation.SuppressLint | |
| import android.arch.lifecycle.LiveData | |
| import android.content.Context | |
| import android.location.Location | |
| import android.os.Looper | |
| import com.google.android.gms.location.* | |
| import swapp.items.com.swappify.firebase.utils.Result | |
| class CurrentLocationLiveData private constructor(context: Context) : LiveData<Result<Location>>() { |