Skip to content

Commit

Permalink
Trigger a refresh when importing a single feed - Fix #93
Browse files Browse the repository at this point in the history
  • Loading branch information
prof18 committed Dec 26, 2023
1 parent e40baed commit 0501cbd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion iosApp/Source/Settings/AddFeed/AddFeedScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ struct AddFeedScreen: View {
for try await state in stream {
switch state {
case let addedState as FeedAddedState.FeedAdded:
self.addFeedViewModel.clearAddDoneState()
// self.addFeedViewModel.clearAddDoneState()
self.appState.snackbarQueue.append(
SnackbarData(
title: addedState.message.localized(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ internal class FeedRetrieverRepository(
),
)
databaseHelper.insertFeedItems(feedItems, currentTimestamp)
updateMutableState.update { FinishedFeedUpdateStatus }
getFeeds()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@ class AddFeedViewModel internal constructor(
}
}

fun clearAddDoneState() {
scope.launch {
feedAddedMutableState.emit(FeedAddedState.FeedNotAdded)
}
}

fun onExpandCategoryClick() {
categoriesMutableState.update { state ->
state.copy(isExpanded = state.isExpanded.not())
Expand Down

0 comments on commit 0501cbd

Please sign in to comment.