Skip to content

Commit 0439370

Browse files
refactor constants name with uppercased ones
Signed-off-by: parneet-guraya <[email protected]>
1 parent 45c49b2 commit 0439370

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

app/src/main/java/fr/free/nrw/commons/CommonsApplication.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,10 @@ class CommonsApplication : MultiDexApplication() {
306306
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
307307

308308
if (loginMessage != null) {
309-
loginIntent.putExtra(loginMessageIntentKey, loginMessage)
309+
loginIntent.putExtra(LOGIN_MESSAGE_INTENT_KEY, loginMessage)
310310
}
311311
if (userName != null) {
312-
loginIntent.putExtra(loginUsernameIntentKey, userName)
312+
loginIntent.putExtra(LOGIN_USERNAME_INTENT_KEY, userName)
313313
}
314314

315315
ctx.startActivity(loginIntent)
@@ -356,9 +356,9 @@ class CommonsApplication : MultiDexApplication() {
356356
}
357357

358358
companion object {
359-
//TODO should be uppercase
360-
const val loginMessageIntentKey: String = "loginMessage"
361-
const val loginUsernameIntentKey: String = "loginUsername"
359+
360+
const val LOGIN_MESSAGE_INTENT_KEY: String = "loginMessage"
361+
const val LOGIN_USERNAME_INTENT_KEY: String = "loginUsername"
362362

363363
const val IS_LIMITED_CONNECTION_MODE_ENABLED: String = "is_limited_connection_mode_enabled"
364364

app/src/main/java/fr/free/nrw/commons/auth/LoginActivity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
import static android.view.KeyEvent.KEYCODE_ENTER;
5151
import static android.view.View.VISIBLE;
5252
import static android.view.inputmethod.EditorInfo.IME_ACTION_DONE;
53-
import static fr.free.nrw.commons.CommonsApplication.loginMessageIntentKey;
54-
import static fr.free.nrw.commons.CommonsApplication.loginUsernameIntentKey;
53+
import static fr.free.nrw.commons.CommonsApplication.LOGIN_MESSAGE_INTENT_KEY;
54+
import static fr.free.nrw.commons.CommonsApplication.LOGIN_USERNAME_INTENT_KEY;
5555

5656
public class LoginActivity extends AccountAuthenticatorActivity {
5757

@@ -94,8 +94,8 @@ public void onCreate(Bundle savedInstanceState) {
9494
binding = ActivityLoginBinding.inflate(getLayoutInflater());
9595
setContentView(binding.getRoot());
9696

97-
String message = getIntent().getStringExtra(loginMessageIntentKey);
98-
String username = getIntent().getStringExtra(loginUsernameIntentKey);
97+
String message = getIntent().getStringExtra(LOGIN_MESSAGE_INTENT_KEY);
98+
String username = getIntent().getStringExtra(LOGIN_USERNAME_INTENT_KEY);
9999

100100
binding.loginUsername.addTextChangedListener(textWatcher);
101101
binding.loginPassword.addTextChangedListener(textWatcher);

0 commit comments

Comments
 (0)