Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
xx Messenger Android
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile
android
xx Messenger Android
Commits
dbb9e59e
Commit
dbb9e59e
authored
Jul 29, 2022
by
Kamal Bramwell
Browse files
Options
Downloads
Patches
Plain Diff
Hide "no results found" toast, but toast other errors
parent
d292b783
No related branches found
No related tags found
4 merge requests
!84
Version 2.92 build 629
,
!77
v2.9 b627
,
!72
FE-948: Invite Friend
,
!69
FE-937: Show matching requests in search results
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/src/main/java/io/xxlabs/messenger/search/UserSearchViewModel.kt
+3
-1
3 additions, 1 deletion
...in/java/io/xxlabs/messenger/search/UserSearchViewModel.kt
with
3 additions
and
1 deletion
app/src/main/java/io/xxlabs/messenger/search/UserSearchViewModel.kt
+
3
−
1
View file @
dbb9e59e
...
@@ -457,7 +457,9 @@ class UserSearchViewModel @Inject constructor(
...
@@ -457,7 +457,9 @@ class UserSearchViewModel @Inject constructor(
val
udResult
=
repo
.
searchUd
(
factQuery
.
fact
,
factQuery
.
type
).
value
()
val
udResult
=
repo
.
searchUd
(
factQuery
.
fact
,
factQuery
.
type
).
value
()
udResult
.
second
?.
let
{
// Error message
udResult
.
second
?.
let
{
// Error message
if
(
it
.
isNotEmpty
())
{
if
(
it
.
isNotEmpty
())
{
if
(!
it
.
contains
(
"no results found"
,
true
))
{
showToast
(
it
)
showToast
(
it
)
}
noResultPlaceholder
(
factQuery
)
noResultPlaceholder
(
factQuery
)
}
else
{
// Search result
}
else
{
// Search result
udResult
.
first
?.
asSearchResult
()
?:
noResultPlaceholder
(
factQuery
)
udResult
.
first
?.
asSearchResult
()
?:
noResultPlaceholder
(
factQuery
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment