diff --git a/app/src/main/java/foundation/e/apps/ui/MainActivity.kt b/app/src/main/java/foundation/e/apps/ui/MainActivity.kt index eb27c0ac6c0d3d78e9a8940b93de51f537103887..91848af3e71c6be16d559704afc5f9be385c1e57 100644 --- a/app/src/main/java/foundation/e/apps/ui/MainActivity.kt +++ b/app/src/main/java/foundation/e/apps/ui/MainActivity.kt @@ -98,11 +98,8 @@ class MainActivity : AppCompatActivity() { bottomNavigationView.selectedItemId = R.id.updatesFragment } - viewModel.createNotificationChannels() - - viewModel.setupConnectivityManager(this.applicationContext) observeInternetConnections() @@ -125,10 +122,6 @@ class MainActivity : AppCompatActivity() { showNoInternet() } - viewModel.updateAppWarningList() - viewModel.updateContentRatings() - viewModel.fetchUpdatableSystemAppsList() - observeEvents() checkGPlayLoginRequest(intent) diff --git a/app/src/main/java/foundation/e/apps/ui/MainActivityViewModel.kt b/app/src/main/java/foundation/e/apps/ui/MainActivityViewModel.kt index b06e667e25fefd2f66556c7582c3b0a238e2efaa..1de9812272def31dbaf2812842b3b8341b1f5f63 100644 --- a/app/src/main/java/foundation/e/apps/ui/MainActivityViewModel.kt +++ b/app/src/main/java/foundation/e/apps/ui/MainActivityViewModel.kt @@ -21,8 +21,6 @@ package foundation.e.apps.ui import android.content.Context import android.content.Intent import android.net.ConnectivityManager -import android.os.Build -import androidx.annotation.RequiresApi import androidx.appcompat.app.AlertDialog import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData @@ -69,6 +67,12 @@ class MainActivityViewModel @Inject constructor( private val systemAppsUpdatesRepository: SystemAppsUpdatesRepository, ) : ViewModel() { + init { + updateAppWarningList() + updateContentRatings() + fetchUpdatableSystemAppsList() + } + val tocStatus: LiveData = appLoungeDataStore.tocStatus.asLiveData() private val _purchaseAppLiveData: MutableLiveData = MutableLiveData()