Вход в каналы по ссылке, клоки отупел

This commit is contained in:
jganenok
2025-11-28 08:26:54 +07:00
parent 9745370613
commit 2e3e2c8dde
4 changed files with 24 additions and 2 deletions

View File

@@ -55,6 +55,28 @@ class _JoinGroupScreenState extends State<JoinGroupScreen> {
Navigator.of(context).pop();
}
// Обработка успешной подписки на канал (opcode 57)
if (message['cmd'] == 1 && message['opcode'] == 57) {
setState(() {
_isLoading = false;
});
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: const Text('Успешно подписались на канал!'),
backgroundColor: Colors.green,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
behavior: SnackBarBehavior.floating,
margin: const EdgeInsets.all(10),
),
);
Navigator.of(context).pop();
}
// Обработка ошибки подписки на канал (opcode 57)
if (message['cmd'] == 3 && message['opcode'] == 57) {
setState(() {
_isLoading = false;