mirror of
https://github.com/rt-bishop/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
Now updating sources and entries on first launch
This commit is contained in:
1 parent
d776b87232
commit
648da0094a
1 file changed
+7
-9
@@ -53,7 +53,7 @@ class SharedViewModel @ViewModelInject constructor(
|
||||
|
||||
init {
|
||||
if (prefsManager.isFirstLaunch()) {
|
||||
setDefaultTleSources()
|
||||
updateDefaultSourcesAndEntries()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,14 +109,12 @@ class SharedViewModel @ViewModelInject constructor(
|
||||
}
|
||||
}
|
||||
|
||||
private fun setDefaultTleSources() {
|
||||
viewModelScope.launch {
|
||||
val defaultTleSources = listOf(
|
||||
TleSource("https://celestrak.com/NORAD/elements/active.txt"),
|
||||
TleSource("https://amsat.org/tle/current/nasabare.txt")
|
||||
)
|
||||
sourcesRepo.updateSources(defaultTleSources)
|
||||
}
|
||||
private fun updateDefaultSourcesAndEntries() {
|
||||
val defaultTleSources = listOf(
|
||||
TleSource("https://celestrak.com/NORAD/elements/active.txt"),
|
||||
TleSource("https://amsat.org/tle/current/nasabare.txt")
|
||||
)
|
||||
updateEntriesFromSources(defaultTleSources)
|
||||
}
|
||||
|
||||
private fun getPassesForEntries(
|
||||
|
||||
Reference in new issue
Block a user