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 Jul 6, 2023
1 parent def58c4 commit 1021465
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 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 @@ -449,6 +449,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 @@ -1105,7 +1105,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 @@ -50,7 +50,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 1021465

Please sign in to comment.