Hotfixes for emoji & multi-account (#5872)

This commit is contained in:
zubiden 2025-04-24 14:22:15 +02:00 committed by Alexander Zinchuk
parent 29ec767eb2
commit 88f34dbde4
4 changed files with 10 additions and 6 deletions

View File

@ -2027,13 +2027,13 @@ export async function fetchChannelRecommendations({ chat }: { chat?: ApiChat })
}; };
} }
export async function updatePaidMessagesPrice({ export function updatePaidMessagesPrice({
chat, paidMessagesStars, chat, paidMessagesStars,
}: { }: {
chat?: ApiChat; paidMessagesStars: number; chat?: ApiChat; paidMessagesStars: number;
}) { }) {
return invokeRequest(new GramJs.channels.UpdatePaidMessagesPrice({ return invokeRequest(new GramJs.channels.UpdatePaidMessagesPrice({
channel: chat && buildInputEntity(chat.id, chat.accessHash) as GramJs.InputChannel, channel: chat && buildInputChannel(chat.id, chat.accessHash),
sendPaidMessagesStars: BigInt(paidMessagesStars), sendPaidMessagesStars: BigInt(paidMessagesStars),
}), { }), {
shouldReturnTrue: true, shouldReturnTrue: true,

View File

@ -552,8 +552,9 @@
&:not(.custom-shape) .emoji:not(.custom-emoji) { &:not(.custom-shape) .emoji:not(.custom-emoji) {
display: inline-block; display: inline-block;
width: 1.25rem; width: 1.25em;
background-size: 1.25rem; height: 1.25em;
background-size: 1.25em;
color: transparent; color: transparent;
margin-inline-end: 1px; margin-inline-end: 1px;
vertical-align: text-bottom; vertical-align: text-bottom;

View File

@ -49,6 +49,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
white-space: nowrap; white-space: nowrap;
height: 1.5rem; // Emoji-only titles ignore line-height on Windows
gap: 1px; // Prevent custom emoji sticking to the text gap: 1px; // Prevent custom emoji sticking to the text
} }

View File

@ -14,6 +14,9 @@ export function hasStoredSession() {
return true; return true;
} }
const slotData = loadSlotSession(ACCOUNT_SLOT);
if (slotData) return Boolean(slotData.dcId);
if (!ACCOUNT_SLOT) { if (!ACCOUNT_SLOT) {
const legacyAuthJson = localStorage.getItem(SESSION_LEGACY_USER_KEY); const legacyAuthJson = localStorage.getItem(SESSION_LEGACY_USER_KEY);
if (legacyAuthJson) { if (legacyAuthJson) {
@ -27,8 +30,7 @@ export function hasStoredSession() {
} }
} }
const slotData = loadSlotSession(ACCOUNT_SLOT); return false;
return Boolean(slotData && slotData.dcId);
} }
export function storeSession(sessionData: ApiSessionData) { export function storeSession(sessionData: ApiSessionData) {