Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_vedio
Commits
47ec6836
Commit
47ec6836
authored
Aug 07, 2023
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
ccabf673
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
MovieFragment.kt
...ain/java/com/mints/helivideo/ui/fragment/MovieFragment.kt
+5
-3
No files found.
video/app/src/main/java/com/mints/helivideo/ui/fragment/MovieFragment.kt
View file @
47ec6836
...
...
@@ -45,6 +45,7 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener
private
val
picContentPresenter
by
lazy
{
PicContentPresenter
()
}
private
var
hotPage
=
1
// 分页
private
var
hotPageSize
=
Constant
.
PAGE_SIZE
// 分页
private
lateinit
var
hotStyleAdapter
:
NewHotStyleAdapter
...
...
@@ -64,6 +65,7 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener
override
fun
onResume
()
{
super
.
onResume
()
hotPageSize
=
if
(
UserManager
.
getInstance
().
vipFlag
)
12
else
9
onRefresh
()
}
...
...
@@ -79,14 +81,14 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener
srlMainPage
.
resetNoMoreData
()
MainExpressManager
.
instance
.
destroy
()
loadAd
()
picContentPresenter
.
getHomePageImageList
(
mType
,
hotPage
,
Constant
.
PAGE_SIZE
)
picContentPresenter
.
getHomePageImageList
(
mType
,
hotPage
,
hotPageSize
)
}
}
override
fun
onLoadMore
(
refreshLayout
:
RefreshLayout
)
{
hotPage
=
++
hotPage
picContentPresenter
.
getHomePageImageList
(
mType
,
hotPage
,
Constant
.
PAGE_SIZE
)
picContentPresenter
.
getHomePageImageList
(
mType
,
hotPage
,
hotPageSize
)
}
override
fun
getHomePageImageListSuc
(
data
:
BannerList
)
{
...
...
@@ -100,7 +102,7 @@ class MovieFragment : LazyLoadBaseFragment(), PicContentView, OnLoadMoreListener
srlMainPage
.
finishRefresh
(
true
)
hotStyleAdapter
.
setNewInstance
(
getAdapterData
(
data
.
list
))
}
else
{
if
(
data
.
list
.
size
<
Constant
.
PAGE_SIZE
)
{
if
(
data
.
list
.
size
<
hotPageSize
)
{
srlMainPage
.
finishLoadMoreWithNoMoreData
()
}
else
{
loadAd
()
...
...
Write
Preview
Markdown
is supported
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