@@ -23,6 +23,7 @@ import androidx.lifecycle.lifecycleScope
23
23
import androidx.navigation.NavOptions
24
24
import androidx.navigation.fragment.findNavController
25
25
import androidx.recyclerview.widget.StaggeredGridLayoutManager
26
+ import com.github.droidworksstudio.common.hasInternetPermission
26
27
import com.github.droidworksstudio.common.hideKeyboard
27
28
import com.github.droidworksstudio.common.launchApp
28
29
import com.github.droidworksstudio.common.launchCalendar
@@ -110,8 +111,10 @@ class HomeFragment : Fragment(),
110
111
observeSwipeTouchListener()
111
112
observeUserInterfaceSettings()
112
113
113
- updateManager = UpdateManagerHelper (this )
114
- updateManager.checkForUpdates()
114
+ if (context.hasInternetPermission()) {
115
+ updateManager = UpdateManagerHelper (this )
116
+ updateManager.checkForUpdates()
117
+ }
115
118
}
116
119
117
120
@SuppressLint(" ClickableViewAccessibility" )
@@ -486,7 +489,9 @@ class HomeFragment : Fragment(),
486
489
observeUserInterfaceSettings()
487
490
observeFavoriteAppList()
488
491
489
- updateManager.checkForUpdates()
492
+ if (context.hasInternetPermission()) {
493
+ updateManager.checkForUpdates()
494
+ }
490
495
}
491
496
492
497
override fun onAppClicked (appInfo : AppInfo ) {
0 commit comments