Skip to content

Commit

Permalink
fixed nits2
Browse files Browse the repository at this point in the history
  • Loading branch information
matsumo0922 committed Dec 14, 2023
1 parent 4adad66 commit f7b6613
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ class PreferenceBookmarkedPosts @Inject constructor(
_data.tryEmit(posts.map { it.id })
}

fun clear() {
accountFile.delete()
_data.tryEmit(emptyList())
}

fun get(): List<FanboxPost> {
if (!accountFile.exists()) return emptyList()

Expand Down
7 changes: 7 additions & 0 deletions core/datastore/src/main/res/raw/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,12 @@
"date": "2023/12/15",
"logJp": "・タブレットや Fold などの大画面端末に対応\n・支援プラン外の投稿などの表示制限コンテンツを省く設定を追加\n・投稿を一覧表示できるグリッドモードを追加\n・投稿詳細画面を左右にスワイプすることで、前後の投稿を次々に確認できるように修正\n・ウェルカム画面から先に進めない不具合を修正",
"logEn": "・Support for large screen devices such as tablets and Fold.\n・Added a setting to omit display-restricted content, such as posts not covered by a support plan.\n・Grid mode has been added to display a list of posts.\n・Fixed a bug that prevented the user from proceeding to the welcome screen.\n・Fixed a bug that prevented users from proceeding from the welcome screen."
},
{
"versionName": "1.1.1",
"versionCode": 10,
"date": "2023/12/15",
"logJp": "・支援中タブが表示できない問題を修正",
"logEn": "・Fixed an issue where the support tab could not be displayed."
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import caios.android.fanbox.core.repository.paging.CreatorPostsPagingSource
import caios.android.fanbox.core.repository.paging.HomePostsPagingSource
import caios.android.fanbox.core.repository.paging.SearchCreatorsPagingSource
import caios.android.fanbox.core.repository.paging.SearchPostsPagingSource
import caios.android.fanbox.core.repository.paging.SupportedPostsPagingSource
import caios.android.fanbox.core.repository.utils.parse
import caios.android.fanbox.core.repository.utils.requireSuccess
import caios.android.fanbox.core.repository.utils.translate
Expand Down Expand Up @@ -215,6 +216,7 @@ class FanboxRepositoryImpl(
if (it) {
CoroutineScope(ioDispatcher).launch {
fanboxCookiePreference.save("")
bookmarkedPostsPreference.clear()
_logoutTrigger.send(OffsetDateTime.now())
}
} else {
Expand Down Expand Up @@ -341,7 +343,7 @@ class FanboxRepositoryImpl(
config = PagingConfig(pageSize = loadSize),
initialKey = null,
pagingSourceFactory = {
HomePostsPagingSource(this, isHideRestricted)
SupportedPostsPagingSource(this, isHideRestricted)
},
)
.flow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,18 @@ internal fun SettingTopRoute(
onClickFollowTabDefaultHome = viewModel::setFollowTabDefaultHome,
onClickHideAdultContents = viewModel::setHideAdultContents,
onClickOverrideAdultContents = viewModel::setOverrideAdultContents,
onClickGridMode = viewModel::setGridMode,
onClickGridMode = {
if (it) {
if (uiState.userData.hasPrivilege) {
viewModel.setGridMode(true)
} else {
ToastUtil.show(context, R.string.billing_plus_toast_require_plus)
navigateToBillingPlus.invoke()
}
} else {
viewModel.setGridMode(false)
}
},
onClickHideRestricted = {
if (it) {
if (uiState.userData.hasPrivilege) {
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
# Application
versionName = "1.1.0"
versionCode = "9"
versionName = "1.1.1"
versionCode = "10"

# SDK
minSdk = "26"
Expand Down
Binary file modified media/google_play/GooglePlay_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified media/google_play/GooglePlay_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified media/google_play/GooglePlay_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified media/google_play/GooglePlay_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified media/google_play/screenshots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f7b6613

Please sign in to comment.