Skip to content

Commit bbb577a

Browse files
committed
feat: enhance unified search no result page
Signed-off-by: alperozturk <[email protected]>
1 parent 45deaca commit bbb577a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app/src/main/java/com/owncloud/android/ui/adapter/UnifiedSearchListAdapter.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ class UnifiedSearchListAdapter(
219219
notifyDataSetChanged()
220220
}
221221

222+
fun isCurrentDirItemsEmpty(): Boolean = currentDirItems.isEmpty()
223+
222224
init {
223225
// initialise thumbnails cache on background thread
224226
ThumbnailsCacheManager.initDiskCacheAsync()

app/src/main/java/com/owncloud/android/ui/fragment/UnifiedSearchFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ class UnifiedSearchFragment :
316316
count += it.entries.size
317317
}
318318

319-
if (count == 0 && pair.first?.isNotEmpty() == true && context != null) {
319+
if (count == 0 && pair.first?.isNotEmpty() == true && context != null && !adapter.isCurrentDirItemsEmpty()) {
320320
showNoResult()
321321
}
322322
}

0 commit comments

Comments
 (0)