mirror of https://github.com/NekoX-Dev/NekoX.git
Fix some official client bugs
This commit is contained in:
parent
dee3203dfa
commit
4e91347163
|
@ -333,6 +333,7 @@ public class MessagesController extends BaseController implements NotificationCe
|
||||||
public Set<String> exportPrivateUri;
|
public Set<String> exportPrivateUri;
|
||||||
public boolean autoarchiveAvailable;
|
public boolean autoarchiveAvailable;
|
||||||
public int groipCallVideoMaxParticipants;
|
public int groipCallVideoMaxParticipants;
|
||||||
|
public int chatReadMarkSizeThreshold;
|
||||||
public boolean suggestStickersApiOnly;
|
public boolean suggestStickersApiOnly;
|
||||||
public ArrayList<String> gifSearchEmojies = new ArrayList<>();
|
public ArrayList<String> gifSearchEmojies = new ArrayList<>();
|
||||||
public HashSet<String> diceEmojies;
|
public HashSet<String> diceEmojies;
|
||||||
|
@ -880,6 +881,7 @@ public class MessagesController extends BaseController implements NotificationCe
|
||||||
showFiltersTooltip = mainPreferences.getBoolean("showFiltersTooltip", false);
|
showFiltersTooltip = mainPreferences.getBoolean("showFiltersTooltip", false);
|
||||||
autoarchiveAvailable = mainPreferences.getBoolean("autoarchiveAvailable", false);
|
autoarchiveAvailable = mainPreferences.getBoolean("autoarchiveAvailable", false);
|
||||||
groipCallVideoMaxParticipants = mainPreferences.getInt("groipCallVideoMaxParticipants", 30);
|
groipCallVideoMaxParticipants = mainPreferences.getInt("groipCallVideoMaxParticipants", 30);
|
||||||
|
chatReadMarkSizeThreshold = mainPreferences.getInt("chatReadMarkSizeThreshold", 100);
|
||||||
suggestStickersApiOnly = mainPreferences.getBoolean("suggestStickersApiOnly", false);
|
suggestStickersApiOnly = mainPreferences.getBoolean("suggestStickersApiOnly", false);
|
||||||
roundVideoSize = mainPreferences.getInt("roundVideoSize", 384);
|
roundVideoSize = mainPreferences.getInt("roundVideoSize", 384);
|
||||||
roundVideoBitrate = mainPreferences.getInt("roundVideoBitrate", 1000);
|
roundVideoBitrate = mainPreferences.getInt("roundVideoBitrate", 1000);
|
||||||
|
@ -1747,6 +1749,18 @@ public class MessagesController extends BaseController implements NotificationCe
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "chat_read_mark_size_threshold": {
|
||||||
|
if (value.value instanceof TLRPC.TL_jsonNumber) {
|
||||||
|
TLRPC.TL_jsonNumber number = (TLRPC.TL_jsonNumber) value.value;
|
||||||
|
Log.e("test", chatReadMarkSizeThreshold + "");
|
||||||
|
if (number.value != chatReadMarkSizeThreshold) {
|
||||||
|
chatReadMarkSizeThreshold = (int) number.value;
|
||||||
|
editor.putInt("chatReadMarkSizeThreshold", chatReadMarkSizeThreshold);
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case "inapp_update_check_delay": {
|
case "inapp_update_check_delay": {
|
||||||
if (value.value instanceof TLRPC.TL_jsonNumber) {
|
if (value.value instanceof TLRPC.TL_jsonNumber) {
|
||||||
TLRPC.TL_jsonNumber number = (TLRPC.TL_jsonNumber) value.value;
|
TLRPC.TL_jsonNumber number = (TLRPC.TL_jsonNumber) value.value;
|
||||||
|
|
|
@ -378,7 +378,7 @@ public class ChatActionCell extends BaseCell implements DownloadController.FileD
|
||||||
} else if (url.startsWith("http")) {
|
} else if (url.startsWith("http")) {
|
||||||
Browser.openUrl(getContext(), url);
|
Browser.openUrl(getContext(), url);
|
||||||
} else {
|
} else {
|
||||||
delegate.needOpenUserProfile(Integer.parseInt(url));
|
delegate.needOpenUserProfile(Long.parseLong(url));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result = true;
|
result = true;
|
||||||
|
|
|
@ -2158,7 +2158,7 @@ public class ChannelAdminLogActivity extends BaseFragment implements Notificatio
|
||||||
((URLSpanMono) url).copyToClipboard();
|
((URLSpanMono) url).copyToClipboard();
|
||||||
Toast.makeText(getParentActivity(), LocaleController.getString("TextCopied", R.string.TextCopied), Toast.LENGTH_SHORT).show();
|
Toast.makeText(getParentActivity(), LocaleController.getString("TextCopied", R.string.TextCopied), Toast.LENGTH_SHORT).show();
|
||||||
} else if (url instanceof URLSpanUserMention) {
|
} else if (url instanceof URLSpanUserMention) {
|
||||||
long peerId = Utilities.parseInt(((URLSpanUserMention) url).getURL());
|
long peerId = Utilities.parseLong(((URLSpanUserMention) url).getURL());
|
||||||
if (peerId > 0) {
|
if (peerId > 0) {
|
||||||
TLRPC.User user = MessagesController.getInstance(currentAccount).getUser(peerId);
|
TLRPC.User user = MessagesController.getInstance(currentAccount).getUser(peerId);
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
|
|
|
@ -21274,7 +21274,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
scrimPopupContainerLayout.setOrientation(LinearLayout.VERTICAL);
|
scrimPopupContainerLayout.setOrientation(LinearLayout.VERTICAL);
|
||||||
boolean showMessageSeen = !isInScheduleMode() && currentChat != null && message.isOutOwner() && message.isSent() && !message.isEditing() && !message.isSending() && !message.isSendError() && !message.isContentUnread() && !message.isUnread() && (ConnectionsManager.getInstance(currentAccount).getCurrentTime() - message.messageOwner.date < 7 * 86400) && (ChatObject.isMegagroup(currentChat) || !ChatObject.isChannel(currentChat)) && chatInfo != null && chatInfo.participants_count < 50 && !(message.messageOwner.action instanceof TLRPC.TL_messageActionChatJoinedByRequest) && (v instanceof ChatMessageCell);
|
boolean showMessageSeen = !isInScheduleMode() && currentChat != null && message.isOutOwner() && message.isSent() && !message.isEditing() && !message.isSending() && !message.isSendError() && !message.isContentUnread() && !message.isUnread() && (ConnectionsManager.getInstance(currentAccount).getCurrentTime() - message.messageOwner.date < 7 * 86400) && (ChatObject.isMegagroup(currentChat) || !ChatObject.isChannel(currentChat)) && chatInfo != null && chatInfo.participants_count < getMessagesController().chatReadMarkSizeThreshold && !(message.messageOwner.action instanceof TLRPC.TL_messageActionChatJoinedByRequest) && (v instanceof ChatMessageCell);
|
||||||
boolean showNoForwards = getMessagesController().isChatNoForwards(currentChat) && message.messageOwner.action == null && message.isSent() && !message.isEditing() && chatMode != MODE_SCHEDULED;
|
boolean showNoForwards = getMessagesController().isChatNoForwards(currentChat) && message.messageOwner.action == null && message.isSent() && !message.isEditing() && chatMode != MODE_SCHEDULED;
|
||||||
MessageSeenView messageSeenView = null;
|
MessageSeenView messageSeenView = null;
|
||||||
if (showMessageSeen) {
|
if (showMessageSeen) {
|
||||||
|
|
Loading…
Reference in New Issue