Fix opposite starred and unread descriptions
This commit is contained in:
parent
86bd1b467c
commit
08b5c5e0f5
20
.github/workflows/build_pull_request.yaml
vendored
Normal file
20
.github/workflows/build_pull_request.yaml
vendored
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
name: "Build Pull Request"
|
||||||
|
on: pull_request
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-java@v2
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: 11
|
||||||
|
|
||||||
|
- uses: gradle/gradle-build-action@v2
|
||||||
|
- run: gradle assembleRelease
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ github.sha }}
|
||||||
|
path: app/build/outputs/apk/release/*.apk
|
|
@ -102,15 +102,13 @@ class FeedsViewModel @Inject constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
groupWithFeedList
|
groupWithFeedList
|
||||||
}.onStart {
|
|
||||||
|
|
||||||
}.onEach { groupWithFeedList ->
|
}.onEach { groupWithFeedList ->
|
||||||
_viewState.update {
|
_viewState.update {
|
||||||
it.copy(
|
it.copy(
|
||||||
importantCount = groupWithFeedList.sumOf { it.group.important ?: 0 }.run {
|
importantCount = groupWithFeedList.sumOf { it.group.important ?: 0 }.run {
|
||||||
when {
|
when {
|
||||||
isStarred -> stringsRepository.getString(R.string.unread_desc, this)
|
isStarred -> stringsRepository.getString(R.string.starred_desc, this)
|
||||||
isUnread -> stringsRepository.getString(R.string.starred_desc, this)
|
isUnread -> stringsRepository.getString(R.string.unread_desc, this)
|
||||||
else -> stringsRepository.getString(R.string.all_desc, this)
|
else -> stringsRepository.getString(R.string.all_desc, this)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -118,7 +116,7 @@ class FeedsViewModel @Inject constructor(
|
||||||
feedsVisible = List(groupWithFeedList.size, init = { true })
|
feedsVisible = List(groupWithFeedList.size, init = { true })
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}.catch() {
|
}.catch {
|
||||||
Log.e("RLog", "catch in articleRepository.pullFeeds(): ${it.message}")
|
Log.e("RLog", "catch in articleRepository.pullFeeds(): ${it.message}")
|
||||||
}.flowOn(Dispatchers.Default).collect()
|
}.flowOn(Dispatchers.Default).collect()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user