mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-18 19:33:55 +00:00
fix: first comment message appear every time
This commit is contained in:
@@ -290,8 +290,8 @@ class CommentsActivity : AppCompatActivity() {
|
||||
snackString("You are banned from commenting :(")
|
||||
return@setOnClickListener
|
||||
}
|
||||
val firstComment = PrefManager.getVal(PrefName.FirstComment, false)
|
||||
if (!firstComment) {
|
||||
val firstComment = PrefManager.getVal<Boolean>(PrefName.FirstComment)
|
||||
if (firstComment) {
|
||||
//show a dialog explaining the rules
|
||||
val alertDialog = android.app.AlertDialog.Builder(this, R.style.MyPopup)
|
||||
.setTitle("Commenting Rules")
|
||||
|
||||
@@ -153,7 +153,7 @@ enum class PrefName(val data: Pref) { //TODO: Split this into multiple files
|
||||
TagsListIsAdult(Pref(Location.Irrelevant, Set::class, setOf<String>())),
|
||||
TagsListNonAdult(Pref(Location.Irrelevant, Set::class, setOf<String>())),
|
||||
MakeDefault(Pref(Location.Irrelevant, Boolean::class, true)),
|
||||
FirstComment(Pref(Location.Irrelevant, Boolean::class, false)),
|
||||
FirstComment(Pref(Location.Irrelevant, Boolean::class, true)),
|
||||
|
||||
//Protected
|
||||
DiscordToken(Pref(Location.Protected, String::class, "")),
|
||||
|
||||
Reference in New Issue
Block a user