mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-23 09:10:04 +02:00
Fix issue #545 - Open with does not work
This commit is contained in:
parent
c147240384
commit
88b6093a53
1 changed files with 5 additions and 0 deletions
|
@ -24,6 +24,8 @@ import static app.fedilab.android.BaseMainActivity.regex_public;
|
|||
import static app.fedilab.android.BaseMainActivity.show_boosts;
|
||||
import static app.fedilab.android.BaseMainActivity.show_replies;
|
||||
import static app.fedilab.android.activities.ContextActivity.expand;
|
||||
import static app.fedilab.android.helper.Helper.PREF_USER_ID;
|
||||
import static app.fedilab.android.helper.Helper.PREF_USER_INSTANCE;
|
||||
import static app.fedilab.android.helper.Helper.PREF_USER_TOKEN;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
|
@ -2047,9 +2049,12 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||
MainActivity.currentAccount = account;
|
||||
SharedPreferences.Editor editor = sharedpreferences.edit();
|
||||
editor.putString(PREF_USER_TOKEN, account.token);
|
||||
editor.putString(PREF_USER_INSTANCE, account.instance);
|
||||
editor.putString(PREF_USER_ID, account.user_id);
|
||||
editor.commit();
|
||||
Intent mainActivity = new Intent(context, MainActivity.class);
|
||||
mainActivity.putExtra(Helper.INTENT_ACTION, Helper.OPEN_WITH_ANOTHER_ACCOUNT);
|
||||
mainActivity.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
mainActivity.putExtra(Helper.PREF_MESSAGE_URL, statusToDeal.url);
|
||||
context.startActivity(mainActivity);
|
||||
((Activity) context).finish();
|
||||
|
|
Loading…
Reference in a new issue