Закрыты задачи бэклога по неочевидному поведению UI при ошибках отправки сообщений и блокировках со стороны Message-safety + добалено ограничение на размер сообщения

This commit is contained in:
mi
2026-07-29 16:45:19 +03:00
parent 41e19005fb
commit bda3ff39d7
36 changed files with 486 additions and 141 deletions
@@ -4,8 +4,7 @@ import { Text, View } from "react-native";
import { useApp } from "../../src/app-context";
import { AuthLoadingView } from "../../src/components/AuthLoadingView";
import { ScreenShell } from "../../src/components/ScreenShell";
import { clearPendingTextIntent, loadPendingTextIntent } from "../../src/pending-intent";
import { dialogApi } from "../../src/services";
import { loadPendingTextIntent } from "../../src/pending-intent";
import { spacing } from "../../src/theme";
import type { Consents } from "../../src/types";
import { Button, ErrorNotice, styles } from "../../src/ui";
@@ -24,18 +23,14 @@ export default function AuthCallbackScreen() {
setError(undefined);
const consents = JSON.parse(raw) as Consents;
await app.finishCallback(params.code, params.state, consents);
window.sessionStorage.removeItem("han.pending-consents");
const intent = loadPendingTextIntent();
if (intent) {
const dialog = await dialogApi.create(intent.dialogKey);
await dialogApi.sendText(dialog.dialog_id, intent.text, intent.messageKey);
clearPendingTextIntent();
window.sessionStorage.removeItem("han.pending-consents");
router.replace(`/dialogs/${dialog.dialog_id}`);
router.replace("/dialogs?pending=1");
return;
}
window.sessionStorage.removeItem("han.pending-consents");
router.replace("/");
};