feat: 隐藏贴吧话题

This commit is contained in:
HuanChengFly 2021-02-01 18:43:53 +08:00
parent 1ac4c9bee8
commit 97c65648fd
4 changed files with 9 additions and 6 deletions

View File

@ -181,6 +181,9 @@ class NewSearchActivity : BaseActivity(), TabLayout.OnTabSelectedListener {
}
private fun loadHotTopic() {
if (appPreferences.hideHotMessageList) {
return
}
if (hotMessageListBean != null) {
addHotTopicAdapters(hotMessageListBean!!)
} else {

View File

@ -32,6 +32,8 @@ open class AppPreferencesUtils(context: Context) {
var hideExplore by SharedPreferenceDelegates.boolean(defaultValue = false)
var hideHotMessageList by SharedPreferenceDelegates.boolean(defaultValue = false)
var homePageScroll by SharedPreferenceDelegates.boolean(defaultValue = false)
var imageLoadType by SharedPreferenceDelegates.string(key = "image_load_type", defaultValue = "0")
@ -50,8 +52,6 @@ open class AppPreferencesUtils(context: Context) {
var showBothUsernameAndNickname by SharedPreferenceDelegates.boolean(defaultValue = false, key = "show_both_username_and_nickname")
var showHotMessageList by SharedPreferenceDelegates.boolean(defaultValue = true)
var showShortcutInThread by SharedPreferenceDelegates.boolean(defaultValue = true)
var showTopForumInNormalList by SharedPreferenceDelegates.boolean(defaultValue = true, key = "show_top_forum_in_normal_list")

View File

@ -421,5 +421,5 @@
<string name="btn_reply_post">%1$s 回复</string>
<string name="btn_reply_post_default">回复</string>
<string name="title_home_page_scroll">首页滑动切换页面</string>
<string name="title_show_hot_message_list">搜索页面显示贴吧话题</string>
<string name="title_hide_hot_message_list">隐藏贴吧话题</string>
</resources>

View File

@ -110,9 +110,9 @@
<SwitchPreference
android:icon="@drawable/ic_round_whatshot"
android:defaultValue="true"
android:key="showHotMessageList"
android:title="@string/title_show_hot_message_list" />
android:defaultValue="false"
android:key="hideHotMessageList"
android:title="@string/title_hide_hot_message_list" />
<Preference
android:enabled="false"