Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
QuasselDroid-ng
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Janne Mareike Koschinski
QuasselDroid-ng
Commits
fa46f6f0
Verified
Commit
fa46f6f0
authored
6 years ago
by
Janne Mareike Koschinski
Browse files
Options
Downloads
Patches
Plain Diff
Fixes crash cluster 3c10ff1f
parent
66173686
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/src/main/java/de/kuschku/quasseldroid/ui/chat/add/NetworkAdapter.kt
+6
-3
6 additions, 3 deletions
...ava/de/kuschku/quasseldroid/ui/chat/add/NetworkAdapter.kt
with
6 additions
and
3 deletions
app/src/main/java/de/kuschku/quasseldroid/ui/chat/add/NetworkAdapter.kt
+
6
−
3
View file @
fa46f6f0
...
@@ -46,7 +46,10 @@ class NetworkAdapter : RecyclerSpinnerAdapter<NetworkAdapter.NetworkViewHolder>(
...
@@ -46,7 +46,10 @@ class NetworkAdapter : RecyclerSpinnerAdapter<NetworkAdapter.NetworkViewHolder>(
override
fun
isEmpty
()
=
data
.
isEmpty
()
override
fun
isEmpty
()
=
data
.
isEmpty
()
override
fun
onBindViewHolder
(
holder
:
NetworkViewHolder
,
position
:
Int
)
=
override
fun
onBindViewHolder
(
holder
:
NetworkViewHolder
,
position
:
Int
)
=
holder
.
bind
(
getItem
(
position
))
holder
.
bind
(
getItem
(
position
)
?:
throw
IndexOutOfBoundsException
(
"Index: $position, Size: ${data.size}"
)
)
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
dropDown
:
Boolean
)
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
dropDown
:
Boolean
)
:
NetworkViewHolder
{
:
NetworkViewHolder
{
...
@@ -69,8 +72,8 @@ class NetworkAdapter : RecyclerSpinnerAdapter<NetworkAdapter.NetworkViewHolder>(
...
@@ -69,8 +72,8 @@ class NetworkAdapter : RecyclerSpinnerAdapter<NetworkAdapter.NetworkViewHolder>(
return
null
return
null
}
}
override
fun
getItem
(
position
:
Int
):
NetworkItem
=
data
[
position
]
override
fun
getItem
(
position
:
Int
):
NetworkItem
?
=
data
.
getOrNull
(
position
)
override
fun
getItemId
(
position
:
Int
)
=
getItem
(
position
).
id
.
id
.
toLong
()
override
fun
getItemId
(
position
:
Int
)
=
getItem
(
position
)
?
.
id
?
.
id
?
.
toLong
()
?:
0L
override
fun
hasStableIds
()
=
true
override
fun
hasStableIds
()
=
true
override
fun
getCount
()
=
data
.
size
override
fun
getCount
()
=
data
.
size
class
NetworkViewHolder
(
itemView
:
View
)
:
class
NetworkViewHolder
(
itemView
:
View
)
:
...
...
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