Skip to content

Commit

Permalink
Fix crash when search is expanded and app is in background
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperDragonXD committed Aug 18, 2024
1 parent ab5b665 commit 83ec23e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class IconRepositoryImpl @Inject constructor(application: Application) : IconRep
}.toPersistentList()

_searchedIconInfoModel.value = IconInfoModel(
iconCount = _iconInfoModel.value.iconCount,
iconCount = _searchedIconInfoModel.value.iconCount,
iconInfo = filteredIcons,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ fun Home(
val iconInfoModel by iconInfoModel.collectAsStateWithLifecycle()
val searchedIconInfoModel by searchedIconInfoModel.collectAsStateWithLifecycle()
val iconRequestModel by iconRequestModel.collectAsStateWithLifecycle()
val searchMode = searchMode
val searchTerm = searchTerm

var expandSearch by remember { mutableStateOf(false) }
val context = LocalContext.current

val lazyGridState = rememberLazyGridState()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class LawniconsViewModel @Inject constructor(
@JvmField
val isIconRequestButtonClicked = userTipsRepository.hasClickedIconRequestButton()

var expandSearch by mutableStateOf(false)

private var _searchMode by mutableStateOf(SearchMode.LABEL)
private var _searchTerm by mutableStateOf("")

Expand Down

0 comments on commit 83ec23e

Please sign in to comment.