chore(merge-upstream): still 21 things to do

This commit is contained in:
LucasGGamerM
2024-02-18 14:19:05 -03:00
parent 76867a971b
commit 64e82bdeed
4 changed files with 34 additions and 20 deletions

View File

@@ -1079,23 +1079,27 @@ public abstract class BaseStatusListFragment<T extends DisplayItemsParent> exten
}
public void maybeShowPreReplySheet(Status status, Runnable proceed){
Relationship rel=getRelationship(status.account.id);
if(!GlobalUserPreferences.isOptedOutOfPreReplySheet(GlobalUserPreferences.PreReplySheetType.NON_MUTUAL, status.account, accountID) &&
!status.account.id.equals(AccountSessionManager.get(accountID).self.id) && rel!=null && !rel.followedBy && status.account.followingCount>=1){
new NonMutualPreReplySheet(getActivity(), notAgain->{
GlobalUserPreferences.optOutOfPreReplySheet(GlobalUserPreferences.PreReplySheetType.NON_MUTUAL, notAgain ? null : status.account, accountID);
proceed.run();
}, status.account, accountID).show();
}else if(!GlobalUserPreferences.isOptedOutOfPreReplySheet(GlobalUserPreferences.PreReplySheetType.OLD_POST, null, null) &&
status.createdAt.isBefore(Instant.now().minus(90, ChronoUnit.DAYS))){
new OldPostPreReplySheet(getActivity(), notAgain->{
if(notAgain)
GlobalUserPreferences.optOutOfPreReplySheet(GlobalUserPreferences.PreReplySheetType.OLD_POST, null, null);
proceed.run();
}, status).show();
}else{
proceed.run();
}
// TODO: figure this stuff out
// Relationship rel=getRelationship(status.account.id);
// if(!GlobalUserPreferences.isOptedOutOfPreReplySheet(GlobalUserPreferences.PreReplySheetType.NON_MUTUAL, status.account, accountID) &&
// !status.account.id.equals(AccountSessionManager.get(accountID).self.id) && rel!=null && !rel.followedBy && status.account.followingCount>=1){
// new NonMutualPreReplySheet(getActivity(), notAgain->{
// GlobalUserPreferences.optOutOfPreReplySheet(GlobalUserPreferences.PreReplySheetType.NON_MUTUAL, notAgain ? null : status.account, accountID);
// proceed.run();
// }, status.account, accountID).show();
// }else if(!GlobalUserPreferences.isOptedOutOfPreReplySheet(GlobalUserPreferences.PreReplySheetType.OLD_POST, null, null) &&
// status.createdAt.isBefore(Instant.now().minus(90, ChronoUnit.DAYS))){
// new OldPostPreReplySheet(getActivity(), notAgain->{
// if(notAgain)
// GlobalUserPreferences.optOutOfPreReplySheet(GlobalUserPreferences.PreReplySheetType.OLD_POST, null, null);
// proceed.run();
// }, status).show();
// }else{
// proceed.run();
// }
proceed.run();
}
protected void onModifyItemViewHolder(BindableViewHolder<StatusDisplayItem> holder){}