Skip to content

Commit

Permalink
Don't reload if the selection is the same
Browse files Browse the repository at this point in the history
  • Loading branch information
Reco1I committed Dec 13, 2024
1 parent 465b361 commit b16fed7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/com/reco1l/osu/beatmaplisting/BeatmapListing.kt
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,13 @@ class BeatmapListing : BaseFragment(),
)
})
.setSelected(mirror.ordinal)
.setOnSelectListener {
Config.setInt("beatmapMirror", it as Int)
mirror = BeatmapMirror.entries[Config.getInt("beatmapMirror", 0)]
search(false)
.setOnSelectListener { value ->
value as Int
if (value != mirror.ordinal) {
Config.setInt("beatmapMirror", value)
mirror = BeatmapMirror.entries[Config.getInt("beatmapMirror", 0)]
search(false)
}
}
.setTitle("Select a beatmap mirror")
.show()
Expand Down

0 comments on commit b16fed7

Please sign in to comment.