Loading app/src/main/java/app/fedilab/android/activities/LoginActivity.java +24 −12 Original line number Diff line number Diff line Loading @@ -54,19 +54,10 @@ public class LoginActivity extends BaseActivity { private final int PICK_IMPORT = 5557; private boolean requestedAdmin; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ThemeHelper.applyTheme(this); SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(LoginActivity.this); setContentView(new FrameLayout(this)); Helper.addFragment(getSupportFragmentManager(), android.R.id.content, new FragmentLoginMain(), null, null, null); requestedAdmin = false; //The activity handles a redirect URI, it will extract token code and will proceed to authentication //That happens when the user wants to use an external browser if (getIntent() != null && getIntent().getData() != null && getIntent().getData().toString().contains(REDIRECT_CONTENT_WEB + "?code=")) { String url = getIntent().getData().toString(); private void manageItent(Intent intent) { if (intent != null && intent.getData() != null && intent.getData().toString().contains(REDIRECT_CONTENT_WEB + "?code=")) { String url = intent.getData().toString(); Matcher matcher = Helper.codePattern.matcher(url); if (!matcher.find()) { Toasty.error(LoginActivity.this, getString(R.string.toast_code_error), Toast.LENGTH_LONG).show(); Loading Loading @@ -108,6 +99,27 @@ public class LoginActivity extends BaseActivity { } } @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); manageItent(intent); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ThemeHelper.applyTheme(this); SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(LoginActivity.this); setContentView(new FrameLayout(this)); Helper.addFragment(getSupportFragmentManager(), android.R.id.content, new FragmentLoginMain(), null, null, null); requestedAdmin = false; //The activity handles a redirect URI, it will extract token code and will proceed to authentication //That happens when the user wants to use an external browser manageItent(getIntent()); } public boolean requestedAdmin() { return requestedAdmin; } Loading app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginMain.java +3 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,9 @@ public class FragmentLoginMain extends Fragment { binding.continueButton.setEnabled(false); NodeInfoVM nodeInfoVM = new ViewModelProvider(requireActivity()).get(NodeInfoVM.class); nodeInfoVM.getNodeInfo(binding.loginInstance.getText().toString()).observe(requireActivity(), nodeInfo -> { if (nodeInfo == null) { return; } binding.continueButton.setEnabled(true); BaseMainActivity.software = nodeInfo.software.name.toUpperCase(); switch (nodeInfo.software.name.toUpperCase().trim()) { Loading app/src/main/java/app/fedilab/android/sqlite/Sqlite.java +1 −1 File changed.Contains only whitespace changes. Show changes Loading
app/src/main/java/app/fedilab/android/activities/LoginActivity.java +24 −12 Original line number Diff line number Diff line Loading @@ -54,19 +54,10 @@ public class LoginActivity extends BaseActivity { private final int PICK_IMPORT = 5557; private boolean requestedAdmin; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ThemeHelper.applyTheme(this); SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(LoginActivity.this); setContentView(new FrameLayout(this)); Helper.addFragment(getSupportFragmentManager(), android.R.id.content, new FragmentLoginMain(), null, null, null); requestedAdmin = false; //The activity handles a redirect URI, it will extract token code and will proceed to authentication //That happens when the user wants to use an external browser if (getIntent() != null && getIntent().getData() != null && getIntent().getData().toString().contains(REDIRECT_CONTENT_WEB + "?code=")) { String url = getIntent().getData().toString(); private void manageItent(Intent intent) { if (intent != null && intent.getData() != null && intent.getData().toString().contains(REDIRECT_CONTENT_WEB + "?code=")) { String url = intent.getData().toString(); Matcher matcher = Helper.codePattern.matcher(url); if (!matcher.find()) { Toasty.error(LoginActivity.this, getString(R.string.toast_code_error), Toast.LENGTH_LONG).show(); Loading Loading @@ -108,6 +99,27 @@ public class LoginActivity extends BaseActivity { } } @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); manageItent(intent); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ThemeHelper.applyTheme(this); SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(LoginActivity.this); setContentView(new FrameLayout(this)); Helper.addFragment(getSupportFragmentManager(), android.R.id.content, new FragmentLoginMain(), null, null, null); requestedAdmin = false; //The activity handles a redirect URI, it will extract token code and will proceed to authentication //That happens when the user wants to use an external browser manageItent(getIntent()); } public boolean requestedAdmin() { return requestedAdmin; } Loading
app/src/main/java/app/fedilab/android/ui/fragment/login/FragmentLoginMain.java +3 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,9 @@ public class FragmentLoginMain extends Fragment { binding.continueButton.setEnabled(false); NodeInfoVM nodeInfoVM = new ViewModelProvider(requireActivity()).get(NodeInfoVM.class); nodeInfoVM.getNodeInfo(binding.loginInstance.getText().toString()).observe(requireActivity(), nodeInfo -> { if (nodeInfo == null) { return; } binding.continueButton.setEnabled(true); BaseMainActivity.software = nodeInfo.software.name.toUpperCase(); switch (nodeInfo.software.name.toUpperCase().trim()) { Loading
app/src/main/java/app/fedilab/android/sqlite/Sqlite.java +1 −1 File changed.Contains only whitespace changes. Show changes