Skip to content

Commit

Permalink
Login related customization.
Browse files Browse the repository at this point in the history
  • Loading branch information
surinder-tsys committed Feb 14, 2024
1 parent f59caa7 commit 77396bf
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 3 deletions.
6 changes: 6 additions & 0 deletions app/src/debug/res/values/setup.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- webview_login_url should be empty in debug mode to show login url input screen
this will be useful in switching the environments during testing -->
<string name="webview_login_url" translatable="false" />
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,10 @@ public boolean shouldOverrideUrlLoading(WebView view, String url) {
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);

//scroll to top when url loads
//because directly loading Telekom login page it scrolls down automatically
view.scrollTo(0,0);

accountSetupWebviewBinding.loginWebviewProgressBar.setVisibility(View.GONE);
accountSetupWebviewBinding.loginWebview.setVisibility(View.VISIBLE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ protected void onNewIntent(Intent intent) {
protected void onRestart() {
Log_OC.v(TAG, "onRestart() start");
super.onRestart();
mixinRegistry.onRestart();
//Fix of NMC-2303 and NMC-2441
if (enableAccountHandling) {
mixinRegistry.onRestart();
}
}

private void onThemeSettingsModeChanged() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,8 @@ protected void onStop() {

@Subscribe(threadMode = ThreadMode.MAIN)
public void onAccountRemovedEvent(AccountRemovedEvent event) {
restart();
//NMC customization
finish();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<color name="login_text_hint_color">#7fC0E3</color>

<!-- Multiaccount support -->
<bool name="multiaccount_support">true</bool>
<bool name="multiaccount_support">false</bool>

<!-- Drawer options -->
<bool name="recently_modified_enabled">false</bool>
Expand Down
5 changes: 5 additions & 0 deletions app/src/release/res/values/setup.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- webview_login_url prod -->
<string name="webview_login_url" translatable="false" >https://magentacloud.de/index.php/login/flow</string>
</resources>

0 comments on commit 77396bf

Please sign in to comment.