Skip to content

Commit

Permalink
trigger the favorite tools sync from the dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
frett committed Oct 2, 2023
1 parent 28eb756 commit 69abba2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.map
Expand Down Expand Up @@ -53,7 +54,10 @@ class DashboardViewModel @Inject constructor(
@Suppress("DeferredResultUnused")
syncService.syncToolSharesAsync()
syncsRunning.value++
syncService.syncTools(force)
coroutineScope {
launch { syncService.syncFavoriteTools(force) }
launch { syncService.syncTools(force) }
}
syncsRunning.value--
}
}
Expand Down

0 comments on commit 69abba2

Please sign in to comment.