summaryrefslogtreecommitdiffstats
path: root/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountFollowRequestAdapter.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountFollowRequestAdapter.java')
-rw-r--r--app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountFollowRequestAdapter.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountFollowRequestAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountFollowRequestAdapter.java
index a765d851b..537f1be38 100644
--- a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountFollowRequestAdapter.java
+++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/AccountFollowRequestAdapter.java
@@ -14,7 +14,8 @@ package app.fedilab.android.mastodon.ui.drawer;
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
* see <http://www.gnu.org/licenses>. */
-import android.app.Activity;
+import static app.fedilab.android.BaseMainActivity.currentAccount;
+
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
@@ -24,7 +25,6 @@ import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
-import androidx.core.app.ActivityOptionsCompat;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStoreOwner;
@@ -38,6 +38,7 @@ import app.fedilab.android.R;
import app.fedilab.android.databinding.DrawerFollowBinding;
import app.fedilab.android.mastodon.activities.ProfileActivity;
import app.fedilab.android.mastodon.client.entities.api.Account;
+import app.fedilab.android.mastodon.client.entities.app.CachedBundle;
import app.fedilab.android.mastodon.helper.Helper;
import app.fedilab.android.mastodon.helper.MastodonHelper;
import app.fedilab.android.mastodon.viewmodel.mastodon.AccountsVM;
@@ -103,11 +104,14 @@ public class AccountFollowRequestAdapter extends RecyclerView.Adapter<RecyclerVi
}));
holderFollow.binding.avatar.setOnClickListener(v -> {
Intent intent = new Intent(context, ProfileActivity.class);
- Bundle b = new Bundle();
- b.putSerializable(Helper.ARG_ACCOUNT, account);
- intent.putExtras(b);
- // start the new activity
- context.startActivity(intent);
+ Bundle args = new Bundle();
+ args.putSerializable(Helper.ARG_ACCOUNT, account);
+ new CachedBundle(context).insertBundle(args, currentAccount, bundleId -> {
+ Bundle bundle = new Bundle();
+ bundle.putLong(Helper.ARG_INTENT_ID, bundleId);
+ intent.putExtras(bundle);
+ context.startActivity(intent);
+ });
});
}