Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
5454d158
Commit
5454d158
authored
Jan 14, 2020
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip nonexisting view holders
parent
482e94aa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mobile/src/main/java/com/github/shadowsocks/ProfilesFragment.kt
.../src/main/java/com/github/shadowsocks/ProfilesFragment.kt
+2
-2
No files found.
mobile/src/main/java/com/github/shadowsocks/ProfilesFragment.kt
View file @
5454d158
...
@@ -111,8 +111,8 @@ class ProfilesFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener {
...
@@ -111,8 +111,8 @@ class ProfilesFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener {
return
if
(
flipper
)
first
++
else
last--
return
if
(
flipper
)
first
++
else
last--
}
}
}.
asSequence
().
toList
().
reversed
())
{
}.
asSequence
().
toList
().
reversed
())
{
val
viewHolder
=
profilesList
.
findViewHolderForAdapterPosition
(
i
)
as
ProfileViewHolder
val
viewHolder
=
profilesList
.
findViewHolderForAdapterPosition
(
i
)
as
?
ProfileViewHolder
if
(
viewHolder
.
item
.
isSponsored
)
{
if
(
viewHolder
?.
item
?.
isSponsored
==
true
)
{
viewHolder
.
populateUnifiedNativeAdView
(
nativeAd
!!
,
nativeAdView
!!
)
viewHolder
.
populateUnifiedNativeAdView
(
nativeAd
!!
,
nativeAdView
!!
)
// might be in the middle of a layout after scrolling, need to wait
// might be in the middle of a layout after scrolling, need to wait
withContext
(
Dispatchers
.
Main
)
{
profilesAdapter
.
notifyItemChanged
(
i
)
}
withContext
(
Dispatchers
.
Main
)
{
profilesAdapter
.
notifyItemChanged
(
i
)
}
...
...
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