mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
Fix profiles
This commit is contained in:
parent
a9712d45b3
commit
197702b461
11 changed files with 22 additions and 70 deletions
|
@ -1419,9 +1419,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, currentAccount.mastodon_account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation(BaseMainActivity.this, headerMainBinding.instanceInfoContainer, getString(R.string.activity_porfile_pp));
|
||||
startActivity(intent, options.toBundle());
|
||||
startActivity(intent);
|
||||
});
|
||||
|
||||
headerMainBinding.accountAcc.setOnClickListener(v -> headerMainBinding.changeAccount.callOnClick());
|
||||
|
|
|
@ -103,9 +103,7 @@ public class AboutActivity extends BaseBarActivity {
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation(AboutActivity.this, binding.accountPp, getString(R.string.activity_porfile_pp));
|
||||
startActivity(intent, options.toBundle());
|
||||
startActivity(intent);
|
||||
});
|
||||
AccountsVM accountsVM = new ViewModelProvider(AboutActivity.this).get(AccountsVM.class);
|
||||
List<String> ids = new ArrayList<>();
|
||||
|
|
|
@ -81,9 +81,7 @@ public class PartnerShipActivity extends BaseBarActivity {
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation(PartnerShipActivity.this, binding.accountPp, getString(R.string.activity_porfile_pp));
|
||||
startActivity(intent, options.toBundle());
|
||||
startActivity(intent);
|
||||
});
|
||||
AccountsVM accountsVM = new ViewModelProvider(PartnerShipActivity.this).get(AccountsVM.class);
|
||||
List<String> ids = new ArrayList<>();
|
||||
|
|
|
@ -168,7 +168,6 @@ public class ProfileActivity extends BaseActivity {
|
|||
if (!checkRemotely) {
|
||||
checkRemotely = sharedpreferences.getBoolean(getString(R.string.SET_PROFILE_REMOTELY), false);
|
||||
}
|
||||
ActivityCompat.postponeEnterTransition(ProfileActivity.this);
|
||||
//Remove title
|
||||
if (actionBar != null) {
|
||||
actionBar.setDisplayShowTitleEnabled(false);
|
||||
|
@ -363,21 +362,18 @@ public class ProfileActivity extends BaseActivity {
|
|||
binding.accountPp.animate();
|
||||
((Animatable) resource).start();
|
||||
}
|
||||
ActivityCompat.startPostponedEnterTransition(ProfileActivity.this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed(@Nullable Drawable errorDrawable) {
|
||||
binding.profilePicture.setImageResource(R.drawable.ic_person);
|
||||
binding.accountPp.setImageResource(R.drawable.ic_person);
|
||||
ActivityCompat.startPostponedEnterTransition(ProfileActivity.this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadCleared(@Nullable Drawable placeholder) {
|
||||
binding.profilePicture.setImageResource(R.drawable.ic_person);
|
||||
binding.accountPp.setImageResource(R.drawable.ic_person);
|
||||
ActivityCompat.startPostponedEnterTransition(ProfileActivity.this);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -445,9 +441,7 @@ public class ProfileActivity extends BaseActivity {
|
|||
b.putSerializable(Helper.ARG_ACCOUNT, account);
|
||||
b.putSerializable(Helper.ARG_CHECK_REMOTELY, true);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation(ProfileActivity.this, binding.profilePicture, getString(R.string.activity_porfile_pp));
|
||||
startActivity(intent, options.toBundle());
|
||||
startActivity(intent);
|
||||
finish();
|
||||
});
|
||||
//Fields for profile
|
||||
|
@ -630,10 +624,8 @@ public class ProfileActivity extends BaseActivity {
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation(ProfileActivity.this, notificationsRelatedAccountsBinding.profilePicture, getString(R.string.activity_porfile_pp));
|
||||
// start the new activity
|
||||
startActivity(intent, options.toBundle());
|
||||
startActivity(intent);
|
||||
});
|
||||
binding.relatedAccounts.addView(notificationsRelatedAccountsBinding.getRoot());
|
||||
}
|
||||
|
|
|
@ -1911,9 +1911,7 @@ public class Helper {
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation(activity, binding.accountPp, activity.getString(R.string.activity_porfile_pp));
|
||||
activity.startActivity(intent, options.toBundle());
|
||||
activity.startActivity(intent);
|
||||
});
|
||||
|
||||
AccountsVM accountsVM = new ViewModelProvider((ViewModelStoreOwner) activity).get(AccountsVM.class);
|
||||
|
|
|
@ -114,10 +114,8 @@ public class AccountAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation((Activity) context, accountViewHolder.binding.avatar, context.getString(R.string.activity_porfile_pp));
|
||||
// start the new activity
|
||||
context.startActivity(intent, options.toBundle());
|
||||
context.startActivity(intent);
|
||||
} else {
|
||||
Toasty.info(context, context.getString(R.string.retrieve_remote_account), Toasty.LENGTH_SHORT).show();
|
||||
SearchVM searchVM = new ViewModelProvider((ViewModelStoreOwner) context).get(SearchVM.class);
|
||||
|
@ -129,10 +127,8 @@ public class AccountAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, accountSearch);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation((Activity) context, accountViewHolder.binding.avatar, context.getString(R.string.activity_porfile_pp));
|
||||
// start the new activity
|
||||
context.startActivity(intent, options.toBundle());
|
||||
context.startActivity(intent);
|
||||
} else {
|
||||
Toasty.info(context, context.getString(R.string.toast_error_search), Toasty.LENGTH_SHORT).show();
|
||||
}
|
||||
|
|
|
@ -106,10 +106,8 @@ public class AccountFollowRequestAdapter extends RecyclerView.Adapter<RecyclerVi
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation((Activity) context, holderFollow.binding.avatar, context.getString(R.string.activity_porfile_pp));
|
||||
// start the new activity
|
||||
context.startActivity(intent, options.toBundle());
|
||||
context.startActivity(intent);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -69,10 +69,8 @@ public class AccountsSearchTopBarAdapter extends SimpleCursorAdapter {
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, accountList.get(position));
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation((Activity) context, account_pp, context.getString(R.string.activity_porfile_pp));
|
||||
// start the new activity
|
||||
context.startActivity(intent, options.toBundle());
|
||||
context.startActivity(intent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -275,10 +275,8 @@ public class NotificationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, notification.account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation((Activity) context, holderFollow.binding.avatar, context.getString(R.string.activity_porfile_pp));
|
||||
// start the new activity
|
||||
context.startActivity(intent, options.toBundle());
|
||||
context.startActivity(intent);
|
||||
});
|
||||
if (notification.isFetchMore && fetchMoreCallBack != null) {
|
||||
holderFollow.binding.layoutFetchMore.fetchMoreContainer.setVisibility(View.VISIBLE);
|
||||
|
@ -388,10 +386,8 @@ public class NotificationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, notification.account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation((Activity) context, holderStatus.bindingNotification.status.avatar, context.getString(R.string.activity_porfile_pp));
|
||||
// start the new activity
|
||||
context.startActivity(intent, options.toBundle());
|
||||
context.startActivity(intent);
|
||||
});
|
||||
holderStatus.bindingNotification.status.mainContainer.setAlpha(.8f);
|
||||
}
|
||||
|
@ -437,10 +433,8 @@ public class NotificationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, relativeNotif.account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation((Activity) context, notificationsRelatedAccountsBinding.profilePicture, context.getString(R.string.activity_porfile_pp));
|
||||
// start the new activity
|
||||
context.startActivity(intent, options.toBundle());
|
||||
context.startActivity(intent);
|
||||
});
|
||||
holderStatus.bindingNotification.relatedAccounts.addView(notificationsRelatedAccountsBinding.getRoot());
|
||||
}
|
||||
|
@ -453,20 +447,16 @@ public class NotificationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, notification.account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation((Activity) context, holderStatus.bindingNotification.status.avatar, context.getString(R.string.activity_porfile_pp));
|
||||
// start the new activity
|
||||
context.startActivity(intent, options.toBundle());
|
||||
context.startActivity(intent);
|
||||
});
|
||||
holderStatus.bindingNotification.status.statusUserInfo.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(context, ProfileActivity.class);
|
||||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, notification.account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation((Activity) context, holderStatus.bindingNotification.status.avatar, context.getString(R.string.activity_porfile_pp));
|
||||
// start the new activity
|
||||
context.startActivity(intent, options.toBundle());
|
||||
context.startActivity(intent);
|
||||
});
|
||||
|
||||
holderStatus.bindingNotification.status.displayName.setText(
|
||||
|
|
|
@ -962,10 +962,8 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, fetchedStatus.reblog != null ? fetchedStatus.reblog.account : fetchedStatus.account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation((Activity) context, holder.binding.avatar, context.getString(R.string.activity_porfile_pp));
|
||||
// start the new activity
|
||||
context.startActivity(intent, options.toBundle());
|
||||
context.startActivity(intent);
|
||||
} else {
|
||||
Toasty.info(context, context.getString(R.string.toast_error_search), Toasty.LENGTH_SHORT).show();
|
||||
}
|
||||
|
@ -975,10 +973,8 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, status.reblog != null ? status.reblog.account : status.account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation((Activity) context, holder.binding.avatar, context.getString(R.string.activity_porfile_pp));
|
||||
// start the new activity
|
||||
context.startActivity(intent, options.toBundle());
|
||||
context.startActivity(intent);
|
||||
}
|
||||
});
|
||||
holder.binding.statusBoosterInfo.setOnClickListener(v -> {
|
||||
|
@ -992,10 +988,8 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, fetchedStatus.account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation((Activity) context, holder.binding.statusBoosterAvatar, context.getString(R.string.activity_porfile_pp));
|
||||
// start the new activity
|
||||
context.startActivity(intent, options.toBundle());
|
||||
context.startActivity(intent);
|
||||
} else {
|
||||
Toasty.info(context, context.getString(R.string.toast_error_search), Toasty.LENGTH_SHORT).show();
|
||||
}
|
||||
|
@ -1005,10 +999,8 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, status.account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation((Activity) context, holder.binding.statusBoosterAvatar, context.getString(R.string.activity_porfile_pp));
|
||||
// start the new activity
|
||||
context.startActivity(intent, options.toBundle());
|
||||
context.startActivity(intent);
|
||||
}
|
||||
});
|
||||
//---> REBLOG/UNREBLOG
|
||||
|
@ -3174,9 +3166,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, status.account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation((Activity) context, holder.bindingArt.artPp, context.getString(R.string.activity_porfile_pp));
|
||||
context.startActivity(intent, options.toBundle());
|
||||
context.startActivity(intent);
|
||||
});
|
||||
holder.bindingArt.artMedia.setOnClickListener(v -> {
|
||||
if (status.art_attachment != null) {
|
||||
|
@ -3228,9 +3218,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, statusToDeal.account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation((Activity) context, holder.bindingPixelfed.artPp, context.getString(R.string.activity_porfile_pp));
|
||||
context.startActivity(intent, options.toBundle());
|
||||
context.startActivity(intent);
|
||||
});
|
||||
holder.bindingPixelfed.bottomBanner.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(context, ContextActivity.class);
|
||||
|
|
|
@ -90,10 +90,8 @@ public class SuggestionAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
Bundle b = new Bundle();
|
||||
b.putSerializable(Helper.ARG_ACCOUNT, account);
|
||||
intent.putExtras(b);
|
||||
ActivityOptionsCompat options = ActivityOptionsCompat
|
||||
.makeSceneTransitionAnimation((Activity) context, holder.binding.avatar, context.getString(R.string.activity_porfile_pp));
|
||||
// start the new activity
|
||||
context.startActivity(intent, options.toBundle());
|
||||
context.startActivity(intent);
|
||||
});
|
||||
holder.binding.followAction.setIconResource(R.drawable.ic_baseline_person_add_24);
|
||||
if (account == null) {
|
||||
|
|
Loading…
Reference in a new issue