fix: first comment message appear every time
This commit is contained in:
parent
68cc81e56c
commit
a7c9604c43
2 changed files with 3 additions and 3 deletions
|
@ -290,8 +290,8 @@ class CommentsActivity : AppCompatActivity() {
|
||||||
snackString("You are banned from commenting :(")
|
snackString("You are banned from commenting :(")
|
||||||
return@setOnClickListener
|
return@setOnClickListener
|
||||||
}
|
}
|
||||||
val firstComment = PrefManager.getVal(PrefName.FirstComment, false)
|
val firstComment = PrefManager.getVal<Boolean>(PrefName.FirstComment)
|
||||||
if (!firstComment) {
|
if (firstComment) {
|
||||||
//show a dialog explaining the rules
|
//show a dialog explaining the rules
|
||||||
val alertDialog = android.app.AlertDialog.Builder(this, R.style.MyPopup)
|
val alertDialog = android.app.AlertDialog.Builder(this, R.style.MyPopup)
|
||||||
.setTitle("Commenting Rules")
|
.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>())),
|
TagsListIsAdult(Pref(Location.Irrelevant, Set::class, setOf<String>())),
|
||||||
TagsListNonAdult(Pref(Location.Irrelevant, Set::class, setOf<String>())),
|
TagsListNonAdult(Pref(Location.Irrelevant, Set::class, setOf<String>())),
|
||||||
MakeDefault(Pref(Location.Irrelevant, Boolean::class, true)),
|
MakeDefault(Pref(Location.Irrelevant, Boolean::class, true)),
|
||||||
FirstComment(Pref(Location.Irrelevant, Boolean::class, false)),
|
FirstComment(Pref(Location.Irrelevant, Boolean::class, true)),
|
||||||
|
|
||||||
//Protected
|
//Protected
|
||||||
DiscordToken(Pref(Location.Protected, String::class, "")),
|
DiscordToken(Pref(Location.Protected, String::class, "")),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue