...
This commit is contained in:
parent
69d93778a4
commit
012fcd7b9b
@ -101,7 +101,7 @@ internal class RssHome : Fragment() {
|
|||||||
fun rssStateVote() = (lasted?.filter { it.vote == true }?.size ?: -1) == (lasted?.size ?: 0)
|
fun rssStateVote() = (lasted?.filter { it.vote == true }?.size ?: -1) == (lasted?.size ?: 0)
|
||||||
var lasted: ArrayList<RssData> = arrayListOf()
|
var lasted: ArrayList<RssData> = arrayListOf()
|
||||||
var infosJob: Job? = null
|
var infosJob: Job? = null
|
||||||
// var rssId = ""
|
// var rssId = ""
|
||||||
lateinit var mRssAdapter: RssItemAdapter
|
lateinit var mRssAdapter: RssItemAdapter
|
||||||
|
|
||||||
var mRssDataResult: RealmResults<RssData>? = null
|
var mRssDataResult: RealmResults<RssData>? = null
|
||||||
@ -752,7 +752,7 @@ internal class RssHome : Fragment() {
|
|||||||
var rQ = getRealm().query<RssData>().sort("read", Sort.ASCENDING)
|
var rQ = getRealm().query<RssData>().sort("read", Sort.ASCENDING)
|
||||||
if (!includeRead) { rQ = rQ.query("read == $0", 0)}
|
if (!includeRead) { rQ = rQ.query("read == $0", 0)}
|
||||||
if (!includeVote) { rQ = rQ.query("vote != $0", true)}
|
if (!includeVote) { rQ = rQ.query("vote != $0", true)}
|
||||||
keywords.forEach {
|
category.forEach {
|
||||||
rQ = rQ.query("category != $0", it)
|
rQ = rQ.query("category != $0", it)
|
||||||
}
|
}
|
||||||
// 사용 예시
|
// 사용 예시
|
||||||
|
|||||||
@ -127,7 +127,7 @@ class SearchBottomSheet : BottomSheetDialogFragment() {
|
|||||||
searchRunnable?.let { debounceHandler.removeCallbacks(it) }
|
searchRunnable?.let { debounceHandler.removeCallbacks(it) }
|
||||||
searchRunnable = Runnable {
|
searchRunnable = Runnable {
|
||||||
val disabledCategories = categoryStates.filter { it.value == false }.keys.toList()
|
val disabledCategories = categoryStates.filter { it.value == false }.keys.toList()
|
||||||
listener?.onSearch(keyword, disabledCategories.toList(), addRead.isChecked,addVote.isChecked)
|
listener?.onSearch(keyword, disabledCategories, addRead.isChecked,addVote.isChecked)
|
||||||
}
|
}
|
||||||
debounceHandler.postDelayed(searchRunnable!!, debounceDelay)
|
debounceHandler.postDelayed(searchRunnable!!, debounceDelay)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,11 +2,11 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical">
|
||||||
android:padding="16dp">
|
|
||||||
|
|
||||||
<!-- 검색어 입력 -->
|
<!-- 검색어 입력 -->
|
||||||
<EditText
|
<EditText
|
||||||
|
android:padding="16dp"
|
||||||
android:id="@+id/inputKeyword"
|
android:id="@+id/inputKeyword"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -16,20 +16,20 @@
|
|||||||
android:singleLine="true" />
|
android:singleLine="true" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:gravity="right|center_vertical"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent">
|
||||||
android:layout_height="match_parent">
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:layout_weight="1"
|
|
||||||
android:padding="0dp"
|
android:padding="0dp"
|
||||||
android:text="add Vote"
|
android:text="Add Vote"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:id="@+id/add_vote"
|
android:id="@+id/add_vote"
|
||||||
android:checked="false"
|
android:checked="false"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"/>
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:layout_weight="1"
|
|
||||||
android:padding="0dp"
|
android:padding="0dp"
|
||||||
android:text="Add Read"
|
android:text="Add Read"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
@ -43,7 +43,7 @@
|
|||||||
<HorizontalScrollView
|
<HorizontalScrollView
|
||||||
android:id="@+id/accessoryToolbar"
|
android:id="@+id/accessoryToolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="48dp"
|
android:layout_height="40dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:background="#F0F0F0"
|
android:background="#F0F0F0"
|
||||||
android:scrollbars="none">
|
android:scrollbars="none">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user