Fix code analysis issues: remove unused imports, debug prints, fix deprecated methods and naming conventions

This commit is contained in:
Ваше Имя
2026-04-04 22:15:55 +07:00
parent ac39a374c3
commit 095155fcf9
10 changed files with 42 additions and 66 deletions
+3 -3
View File
@@ -2,7 +2,7 @@
///
/// Naming follows the server-side convention.
/// Use [Opcode.name] to get a human-readable label for logging.
///
///
/// файл писла нейронка (я че ебанутый чтоль чтобы вручную хуярить опкоды и их значения)
abstract class Opcode {
// ── Session ────────────────────────────────────────────────────────
@@ -124,7 +124,7 @@ abstract class Opcode {
// ── Sessions ───────────────────────────────────────────────────────
static const int sessionsInfo = 96; // Запрос активных сессий
static const int sessionsClose = 97; // Закрытие всех сессий
static const int phoneBind_request = 98; // Запрос привязки телефона
static const int phoneBindRequest = 98; // Запрос привязки телефона
static const int phoneBindConfirm = 99; // Подтверждение привязки телефона
// ── Bots ───────────────────────────────────────────────────────────
@@ -297,7 +297,7 @@ abstract class Opcode {
audioPlay: 'AUDIO_PLAY',
sessionsInfo: 'SESSIONS_INFO',
sessionsClose: 'SESSIONS_CLOSE',
phoneBind_request: 'PHONE_BIND_REQUEST',
phoneBindRequest: 'PHONE_BIND_REQUEST',
phoneBindConfirm: 'PHONE_BIND_CONFIRM',
chatComplain: 'CHAT_COMPLAIN',
msgSendCallback: 'MSG_SEND_CALLBACK',
+2 -4
View File
@@ -137,9 +137,7 @@ Future<Packet> unpackPacket(Uint8List packet) async {
_maxDecompressedSize,
);
} catch (e) {
// В изоляте нельзя использовать логгер, который пишет в терминал через зависимости Flutter,
// но простой print или throw сработает
print("LZ4 decompression error: $e");
throw Exception("LZ4 decompression error: $e");
}
}
}
@@ -148,7 +146,7 @@ Future<Packet> unpackPacket(Uint8List packet) async {
payload = msgpack.deserialize(payloadBytes);
} catch (e) {
if (payloadBytes.isNotEmpty) {
print("MsgPack deserialization error: $e");
throw Exception("MsgPack deserialization error: $e");
}
}
}
-1
View File
@@ -1,7 +1,6 @@
import 'dart:io';
import 'package:path/path.dart';
import 'package:sqflite/sqflite.dart';
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
class ProfileData {