generated from JetBrains/compose-multiplatform-template
-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show groups in feeds bottom sheet (#448)
* Change `selectedFeeds` in `FeedsState` to `SelectedSources` * Change `ObservableSelectedFeed` to `ObservableActiveSource` * Rename bottom sheet item to `FeedBottomBarItem` * Add queries to DB actions on collection of feed groups * Use list instead of set for doing DB actions on multiple feeds This is to avoid creating another set in memory after filtering by instance * Add query to update feed group pinned at * Add queries to delete sources in a transaction * Change events to take `Source` instead of just `Feed` * Show feed groups in feeds bottom sheet * Add context action item for adding selected feeds to folder * Add support for filtering posts by feed groups in posts queries * Add support for refreshing selected feed group * Fix feed group preview icons container size in feeds bottom bar * Remove id from feed group when feed is deleted * Add index for `pinnedAt` in `Feed` and `FeedGroup` table * Add query to load observable number of feeds * Add queries to load combine sources (feed & feed groups) * Remove unused queries * Load combined sources (feed & feed group) in feeds bottom sheet
- Loading branch information
1 parent
1517fc8
commit 05dab2a
Showing
29 changed files
with
1,167 additions
and
374 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/database/TransactionRunner.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright 2024 Sasikanth Miriyampalli | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package dev.sasikanth.rss.reader.database | ||
|
||
import me.tatarka.inject.annotations.Inject | ||
|
||
@Inject | ||
class TransactionRunner(private val database: ReaderDatabase) { | ||
|
||
fun <T> invoke(block: () -> T): T { | ||
return database.transactionWithResult { block() } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.