Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
App Lounge
Commits
12316d9b
Commit
12316d9b
authored
Jan 25, 2019
by
Nihar Thakkar
Browse files
Fix "load more" bug
parent
f4f8f38f
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/io/eelo/appinstaller/categories/category/CategoryActivity.kt
View file @
12316d9b
...
...
@@ -108,6 +108,7 @@ class CategoryActivity : AppCompatActivity(), ApplicationManagerServiceConnectio
progressBar
.
visibility
=
View
.
GONE
loadMoreContainer
.
visibility
=
View
.
GONE
}
else
{
loadMoreContainer
.
visibility
=
View
.
GONE
isLoadingMoreApplications
=
false
}
}
else
{
...
...
app/src/main/java/io/eelo/appinstaller/search/SearchFragment.kt
View file @
12316d9b
...
...
@@ -140,6 +140,7 @@ class SearchFragment : Fragment(), SearchView.OnQueryTextListener, SearchView.On
progressBar
.
visibility
=
View
.
GONE
loadMoreContainer
.
visibility
=
View
.
GONE
}
else
{
loadMoreContainer
.
visibility
=
View
.
GONE
isLoadingMoreApplications
=
false
}
}
else
{
...
...
app/src/main/java/io/eelo/appinstaller/search/model/SearchModel.kt
View file @
12316d9b
...
...
@@ -53,14 +53,16 @@ class SearchModel : SearchModelInterface {
override
fun
onSearchComplete
(
error
:
Error
?,
applicationList
:
ArrayList
<
Application
>)
{
if
(
error
==
null
)
{
if
(
pageNumber
>
1
&&
this
.
applicationList
.
value
!=
null
)
{
val
combinedAppList
=
this
.
applicationList
.
value
!!
combinedAppList
.
addAll
(
applicationList
)
this
.
applicationList
.
value
=
combinedAppList
}
else
{
this
.
applicationList
.
value
=
applicationList
if
(
applicationList
.
isNotEmpty
())
{
if
(
pageNumber
>
1
&&
this
.
applicationList
.
value
!=
null
)
{
val
combinedAppList
=
this
.
applicationList
.
value
!!
combinedAppList
.
addAll
(
applicationList
)
this
.
applicationList
.
value
=
combinedAppList
}
else
{
this
.
applicationList
.
value
=
applicationList
}
}
if
(
applicationList
.
isEmpty
())
{
else
{
screenError
.
value
=
Error
.
NO_RESULTS
}
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment