Skip to content

Commit 9118970

Browse files
authored
Update AboutActivity.kt
1 parent 0054657 commit 9118970

File tree

1 file changed

+6
-7
lines changed
  • app/src/main/java/com/mrboomdev/awery/ui/mobile/screens/settings

1 file changed

+6
-7
lines changed

app/src/main/java/com/mrboomdev/awery/ui/mobile/screens/settings/AboutActivity.kt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private val EXCLUDE_GITHUB_IDS = arrayOf(
6464
114061880L, // tinotendamha
6565
72887534L, // asvintheguy
6666
175734244L, // SaarGirl
67-
171004872L, // Goko1
67+
171004872L, // Goki1
6868
119158637L, // Runkandel
6969
22217419L // rezaalmanda
7070
)
@@ -75,19 +75,16 @@ private val LOCAL_DEVS = arrayOf(
7575
"https://github.com/MrBoomDeveloper",
7676
"https://cdn.discordapp.com/avatars/1034891767822176357/3420c6a4d16fe513a69c85d86cb206c2.png?size=4096"
7777
),
78-
7978
Contributor(
8079
"Itsmechinmoy", arrayOf("Contributor, Discord and Telegram Admin"),
8180
"https://github.com/itsmechinmoy",
8281
"https://avatars.githubusercontent.com/u/167056923?v=4"
8382
),
84-
8583
Contributor(
8684
"Shebyyy", arrayOf("Contributor, Discord and Telegram Moderator"),
8785
"https://github.com/Shebyyy",
8886
"https://avatars.githubusercontent.com/u/83452219?v=4"
8987
),
90-
9188
Contributor(
9289
"Ichiro", arrayOf("App Icon"),
9390
"https://discord.com/channels/@me/1262060731981889536",
@@ -127,6 +124,7 @@ class AboutActivity : AppCompatActivity() {
127124
})
128125

129126
val items = LOCAL_DEVS.toMutableList()
127+
val localUsernames = LOCAL_DEVS.map { it.name.lowercase() }.toSet()
130128

131129
class ViewHolder(val view: ContributorView): RecyclerView.ViewHolder(view)
132130

@@ -149,13 +147,14 @@ class AboutActivity : AppCompatActivity() {
149147
cacheDuration = 60 * 60 * 24 * 7 /** 7 days **/
150148
}.fetch().let {
151149
getMoshi().adapter<List<GitHubContributor>>().fromJson(it.text)!!
152-
}.filter {
153-
it.id !in EXCLUDE_GITHUB_IDS
150+
}.filter { contributor ->
151+
contributor.id !in EXCLUDE_GITHUB_IDS &&
152+
contributor.login.lowercase() !in localUsernames
154153
}.map { it.toContributor() }
155154

156155
withContext(Dispatchers.Main) {
157156
items.addAll(receivedItems)
158-
info.recycler.adapter!!.notifyItemRangeInserted(2, receivedItems.size)
157+
info.recycler.adapter!!.notifyItemRangeInserted(LOCAL_DEVS.size, receivedItems.size)
159158
}
160159
}
161160
}.root)

0 commit comments

Comments
 (0)