Fix issue #871 - Remove instance name encoded in UTF-8

This commit is contained in:
Thomas 2023-05-26 11:02:11 +02:00
parent 103f030f6b
commit be8943163a

View file

@ -51,10 +51,8 @@ import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider; import androidx.lifecycle.ViewModelProvider;
import androidx.preference.PreferenceManager; import androidx.preference.PreferenceManager;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;
import java.net.URLEncoder;
import app.fedilab.android.BaseMainActivity; import app.fedilab.android.BaseMainActivity;
import app.fedilab.android.R; import app.fedilab.android.R;
@ -290,11 +288,7 @@ public class FragmentLoginMain extends Fragment {
e.printStackTrace(); e.printStackTrace();
} }
try { currentInstanceLogin = host;
currentInstanceLogin = URLEncoder.encode(host, "utf-8");
} catch (UnsupportedEncodingException e) {
currentInstanceLogin = host;
}
String scopes = requestedAdmin ? Helper.OAUTH_SCOPES_ADMIN : Helper.OAUTH_SCOPES; String scopes = requestedAdmin ? Helper.OAUTH_SCOPES_ADMIN : Helper.OAUTH_SCOPES;
AppsVM appsVM = new ViewModelProvider(requireActivity()).get(AppsVM.class); AppsVM appsVM = new ViewModelProvider(requireActivity()).get(AppsVM.class);
appsVM.createApp(currentInstanceLogin, getString(R.string.app_name), appsVM.createApp(currentInstanceLogin, getString(R.string.app_name),