Change progress bar title when opting out of classes

Fixes #1003
This commit is contained in:
Angelo Viado 2019-02-04 00:18:17 +09:00 committed by Phillip Thelen
parent 5a8d8788ef
commit 8e8e39accd
2 changed files with 5 additions and 4 deletions

View file

@ -365,6 +365,7 @@
<string name="select_class">Select Class</string>
<string name="opt_out_class">Opt Out</string>
<string name="opt_out_description">Can\'t be bothered with classes? Want to choose later? Opt out - you\'ll be a warrior with no special abilities. You can read about the class system later on the wiki and enable classes at any time.</string>
<string name="opting_out_progress">Opting Out</string>
<string name="class_confirmation">Are you sure you want to be a %s?</string>
<string name="class_changed">You are now a %s!</string>
<string name="class_changed_description">You have new default Battle Gear that you can change under Equipment!</string>

View file

@ -182,19 +182,19 @@ class ClassSelectionActivity : BaseActivity(), Consumer<User> {
private fun optOutOfClasses() {
shouldFinish = true
this.displayProgressDialog()
this.displayProgressDialog(getString(R.string.opting_out_progress))
compositeSubscription.add(userRepository.disableClasses().subscribe(this, RxErrorHandler.handleEmptyError()))
}
private fun selectClass(selectedClass: String) {
shouldFinish = true
this.displayProgressDialog()
this.displayProgressDialog(getString(R.string.changing_class_progress))
compositeSubscription.add(userRepository.changeClass(selectedClass).subscribe(this, RxErrorHandler.handleEmptyError()))
}
private fun displayProgressDialog() {
private fun displayProgressDialog(progressText: String) {
@Suppress("DEPRECATION")
progressDialog = ProgressDialog.show(this, getString(R.string.changing_class_progress), null, true)
progressDialog = ProgressDialog.show(this, progressText, null, true)
}
override fun accept(user: User) {