Skip to content

Commit

Permalink
Re-enable preBeta feature flag for MGAD. (#4877)
Browse files Browse the repository at this point in the history
* Re-enable preBeta feature flag for MGAD.

* Add one more check.

* Temporarily remove en from language list.
  • Loading branch information
dbrant authored Aug 19, 2024
1 parent fa4ab72 commit aa0c939
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ import org.wikipedia.suggestededits.SuggestedEditsSurvey
import org.wikipedia.suggestededits.SuggestionsActivity
import org.wikipedia.util.DeviceUtil
import org.wikipedia.util.FeedbackUtil
import org.wikipedia.util.ReleaseUtil
import org.wikipedia.util.StringUtil
import org.wikipedia.util.log.L
import org.wikipedia.views.SuggestedArticleDescriptionsDialog
import java.io.IOException
import java.util.Date
import java.util.concurrent.TimeUnit
Expand Down Expand Up @@ -219,7 +221,9 @@ class DescriptionEditFragment : Fragment() {
binding.fragmentDescriptionEditView.setEditAllowed(editingAllowed)
binding.fragmentDescriptionEditView.updateInfoText()

binding.fragmentDescriptionEditView.isSuggestionButtonEnabled = true
binding.fragmentDescriptionEditView.isSuggestionButtonEnabled = ReleaseUtil.isPreBetaRelease &&
SuggestedArticleDescriptionsDialog.availableLanguages.contains(pageTitle.wikiSite.languageCode) &&
binding.fragmentDescriptionEditView.description.isNullOrEmpty()

if (binding.fragmentDescriptionEditView.isSuggestionButtonEnabled) {
binding.fragmentDescriptionEditView.showSuggestedDescriptionsLoadingProgress()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ class SuggestedArticleDescriptionsDialog(
}

companion object {
// TODO: reenable 'en' when ready.
val availableLanguages = listOf(
"en", "ru", "vi", "ja", "de", "ro", "fr", "fi", "ko", "es", "zh", "it",
"ru", "vi", "ja", "de", "ro", "fr", "fi", "ko", "es", "zh", "it",
"nl", "ar", "tr", "hi", "cs", "lt", "lv", "kk", "et", "ni", "si", "gu", "my"
)
}
Expand Down

0 comments on commit aa0c939

Please sign in to comment.