fix: replying message hide correctly

This commit is contained in:
rebelonion 2024-02-25 01:18:44 -06:00
parent f128dee3e4
commit d5c87c46aa
3 changed files with 13 additions and 14 deletions

View file

@ -42,7 +42,7 @@ class CommentItem(val comment: Comment,
private var subCommentIds: MutableList<Int> = mutableListOf()
val repliesSection = Section()
private var isEditing = false
private var isReplying = false
var isReplying = false
private var repliesVisible = false
var MAX_DEPTH = 3
@ -201,7 +201,6 @@ class CommentItem(val comment: Comment,
fun replying(isReplying: Boolean) {
binding?.commentReply?.text = if (isReplying) currActivity()!!.getString(R.string.cancel) else "Reply"
PrefManager.setVal(PrefName.ReplyTo, isReplying)
this.isReplying = isReplying
}
@ -226,10 +225,6 @@ class CommentItem(val comment: Comment,
subCommentIds.clear()
}
fun test(isEditing: Boolean){
this.isEditing = isEditing
}
private fun setVoteButtons(viewBinding: ItemCommentsBinding) {
when (comment.userVoteType) {
1 -> {
@ -351,7 +346,7 @@ class CommentItem(val comment: Comment,
* @param message the message of the dialog
* @param callback the callback to call when the user clicks yes
*/
fun dialogBuilder(title: String, message: String, callback: () -> Unit) {
private fun dialogBuilder(title: String, message: String, callback: () -> Unit) {
val alertDialog = android.app.AlertDialog.Builder(commentsActivity, R.style.MyPopup)
.setTitle(title)
.setMessage(message)