Skip to content

Commit

Permalink
Fix Arabic words counter in Quick Note dialog #171
Browse files Browse the repository at this point in the history
  • Loading branch information
alialbaali committed Mar 25, 2023
1 parent 49db7ce commit 3d800de
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.core.view.isVisible
import androidx.lifecycle.lifecycleScope
import androidx.navigation.fragment.navArgs
import com.noto.app.R
Expand Down Expand Up @@ -127,6 +128,14 @@ class QuickNoteDialogFragment constructor() : BaseDialogFragment(isCollapsable =
body.wordsCount,
)
}.launchIn(lifecycleScope)

if (isCurrentLocaleArabic()) {
tvWordCount.isVisible = false
tvWordCountRtl.isVisible = true
} else {
tvWordCount.isVisible = true
tvWordCountRtl.isVisible = false
}
}

override fun onDismiss(dialog: DialogInterface) {
Expand Down

0 comments on commit 3d800de

Please sign in to comment.