Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
wkoomson committed Jun 24, 2023
1 parent 445fef1 commit 5e4789b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/src/main/java/com/jerboa/db/AppDB.kt
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,9 @@ class SearchHistoryRepository(
fun history(): Flow<List<SearchHistory>> = searchHistoryDao.history()

suspend fun insert(item: SearchHistory) {
if (appSettingsDao.settings().first().saveSearchHistory)
if (appSettingsDao.settings().first().saveSearchHistory) {
searchHistoryDao.insert(item)
}
}

suspend fun delete(item: SearchHistory) = searchHistoryDao.delete(item)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import kotlinx.coroutines.flow.map
import kotlinx.coroutines.launch
import java.time.Instant

class CommunityListViewModelFactory(private val repository: SearchHistoryRepository)
: ViewModelProvider.Factory {
class CommunityListViewModelFactory(private val repository: SearchHistoryRepository) :
ViewModelProvider.Factory {
override fun <T : ViewModel> create(modelClass: Class<T>): T {
if (modelClass.isAssignableFrom(CommunityListViewModel::class.java)) {
@Suppress("UNCHECKED_CAST")
Expand Down

0 comments on commit 5e4789b

Please sign in to comment.