Skip to content

Commit b830eed

Browse files
Fix: Fixed the withoutInternet build from trying to find new build.
Signed-off-by: HeCodes2Much <wayne6324@gmail.com>
1 parent 9b007b8 commit b830eed

File tree

1 file changed

+8
-3
lines changed
  • app/src/main/java/com/github/droidworksstudio/launcher/ui/home

1 file changed

+8
-3
lines changed

app/src/main/java/com/github/droidworksstudio/launcher/ui/home/HomeFragment.kt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import androidx.lifecycle.lifecycleScope
2323
import androidx.navigation.NavOptions
2424
import androidx.navigation.fragment.findNavController
2525
import androidx.recyclerview.widget.StaggeredGridLayoutManager
26+
import com.github.droidworksstudio.common.hasInternetPermission
2627
import com.github.droidworksstudio.common.hideKeyboard
2728
import com.github.droidworksstudio.common.launchApp
2829
import com.github.droidworksstudio.common.launchCalendar
@@ -110,8 +111,10 @@ class HomeFragment : Fragment(),
110111
observeSwipeTouchListener()
111112
observeUserInterfaceSettings()
112113

113-
updateManager = UpdateManagerHelper(this)
114-
updateManager.checkForUpdates()
114+
if (context.hasInternetPermission()) {
115+
updateManager = UpdateManagerHelper(this)
116+
updateManager.checkForUpdates()
117+
}
115118
}
116119

117120
@SuppressLint("ClickableViewAccessibility")
@@ -486,7 +489,9 @@ class HomeFragment : Fragment(),
486489
observeUserInterfaceSettings()
487490
observeFavoriteAppList()
488491

489-
updateManager.checkForUpdates()
492+
if (context.hasInternetPermission()) {
493+
updateManager.checkForUpdates()
494+
}
490495
}
491496

492497
override fun onAppClicked(appInfo: AppInfo) {

0 commit comments

Comments
 (0)