Skip to content

Commit 5f1e4bd

Browse files
committed
Login related customization.
1 parent e625f45 commit 5f1e4bd

File tree

6 files changed

+22
-3
lines changed

6 files changed

+22
-3
lines changed

app/src/debug/res/values/setup.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<!-- webview_login_url should be empty in debug mode to show login url input screen
4+
this will be useful in switching the environments during testing -->
5+
<string name="webview_login_url" translatable="false" />
6+
</resources>

app/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,10 @@ public boolean shouldOverrideUrlLoading(WebView view, String url) {
458458
public void onPageFinished(WebView view, String url) {
459459
super.onPageFinished(view, url);
460460

461+
//scroll to top when url loads
462+
//because directly loading Telekom login page it scrolls down automatically
463+
view.scrollTo(0,0);
464+
461465
accountSetupWebviewBinding.loginWebviewProgressBar.setVisibility(View.GONE);
462466
accountSetupWebviewBinding.loginWebview.setVisibility(View.VISIBLE);
463467

app/src/main/java/com/owncloud/android/ui/activity/BaseActivity.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ protected void onNewIntent(Intent intent) {
109109
protected void onRestart() {
110110
Log_OC.v(TAG, "onRestart() start");
111111
super.onRestart();
112-
mixinRegistry.onRestart();
112+
//Fix of NMC-2303 and NMC-2441
113+
if (enableAccountHandling) {
114+
mixinRegistry.onRestart();
115+
}
113116
}
114117

115118
private void onThemeSettingsModeChanged() {

app/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,8 @@ protected void onStop() {
11681168

11691169
@Subscribe(threadMode = ThreadMode.MAIN)
11701170
public void onAccountRemovedEvent(AccountRemovedEvent event) {
1171-
restart();
1171+
//NMC customization
1172+
finish();
11721173
}
11731174

11741175
/**

app/src/main/res/values/setup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<color name="login_text_hint_color">#7fC0E3</color>
5454

5555
<!-- Multiaccount support -->
56-
<bool name="multiaccount_support">true</bool>
56+
<bool name="multiaccount_support">false</bool>
5757

5858
<!-- Drawer options -->
5959
<bool name="recently_modified_enabled">false</bool>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<!-- webview_login_url prod -->
4+
<string name="webview_login_url" translatable="false" >https://magentacloud.de/index.php/login/flow</string>
5+
</resources>

0 commit comments

Comments
 (0)