chore(merge-upstream): still 21 things to do
This commit is contained in:
@@ -50,6 +50,7 @@ public class AccountLocalPreferences{
|
||||
public ShowEmojiReactions showEmojiReactions;
|
||||
public ColorPreference color;
|
||||
public ArrayList<Emoji> recentCustomEmoji;
|
||||
public boolean preReplySheet;
|
||||
|
||||
private final static Type recentLanguagesType=new TypeToken<ArrayList<String>>() {}.getType();
|
||||
private final static Type timelinesType=new TypeToken<ArrayList<TimelineDefinition>>() {}.getType();
|
||||
@@ -68,6 +69,7 @@ public class AccountLocalPreferences{
|
||||
revealCWs=prefs.getBoolean("revealCWs", false);
|
||||
hideSensitiveMedia=prefs.getBoolean("hideSensitive", true);
|
||||
serverSideFiltersSupported=prefs.getBoolean("serverSideFilters", false);
|
||||
// preReplySheet=prefs.getBoolean("preReplySheet", false);
|
||||
|
||||
// MEGALODON
|
||||
showReplies=prefs.getBoolean("showReplies", true);
|
||||
@@ -112,6 +114,9 @@ public class AccountLocalPreferences{
|
||||
.putBoolean("hideSensitive", hideSensitiveMedia)
|
||||
.putBoolean("serverSideFilters", serverSideFiltersSupported)
|
||||
|
||||
//TODO figure this stuff out
|
||||
// .putBoolean("preReplySheet", preReplySheet)
|
||||
|
||||
// MEGALODON
|
||||
.putBoolean("showReplies", showReplies)
|
||||
.putBoolean("showBoosts", showBoosts)
|
||||
@@ -169,4 +174,9 @@ public class AccountLocalPreferences{
|
||||
ONLY_OPENED,
|
||||
ALWAYS
|
||||
}
|
||||
|
||||
// public enum PreReplySheetType{
|
||||
// OLD_POST,
|
||||
// NON_MUTUAL
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
// 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();
|
||||
}, 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();
|
||||
}
|
||||
}
|
||||
|
||||
protected void onModifyItemViewHolder(BindableViewHolder<StatusDisplayItem> holder){}
|
||||
|
||||
@@ -147,7 +147,7 @@ public class PhotoViewerInfoSheet extends BottomSheet{
|
||||
statusID=status.id;
|
||||
boostBtn.setCompoundDrawablesWithIntrinsicBounds(0, switch(status.visibility){
|
||||
case DIRECT -> R.drawable.ic_boost_disabled_24px;
|
||||
case PUBLIC, UNLISTED -> R.drawable.ic_boost;
|
||||
case PUBLIC, UNLISTED, LOCAL -> R.drawable.ic_boost;
|
||||
case PRIVATE -> R.drawable.ic_boost_private;
|
||||
}, 0, 0);
|
||||
boostBtn.setEnabled(status.visibility!=StatusPrivacy.DIRECT);
|
||||
|
||||
@@ -115,8 +115,8 @@ public class ComposeLanguageAlertViewController{
|
||||
int i=0;
|
||||
boolean found=false;
|
||||
for(SpecialLocaleInfo li:specialLocales){
|
||||
if(null!=li.locale&&li.locale.equals(previouslySelected.locale)){
|
||||
selectedLocale=li.locale;
|
||||
if(null!=li.language&&li.language.equals(previouslySelected.language)){
|
||||
selectedLocale=li.language;
|
||||
selectedIndex=i;
|
||||
found=true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user