fix: flutter analyze Warnings beheben (totes/unerreichbares Code)

Entfernt tatsächlich toten Code, den flutter analyze als Warning markiert
hatte: unbenutzte Felder/Parameter (_saved, _hovered wird jetzt für Hover-
Feedback genutzt, destructive-Flag ohne Aufrufer, size-Parameter ohne
Override), unerreichbaren dead_code (Room.topic/Space.topic sind laut SDK
nie null, client.database ist nie null) sowie Legacy-Funktionen aus der
alten Push-Architektur (_showNotif/_fetchTitle, ersetzt durch natives
PushService.kt) und einen leeren Noise-Suppression-Stub ohne Aufrufer.
Keine funktionale Verhaltensänderung an aktiven Code-Pfaden.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Bernd Steckmeister
2026-07-03 06:26:31 +02:00
parent 594e6718be
commit 9dc11757e2
9 changed files with 31 additions and 132 deletions
+6 -7
View File
@@ -518,13 +518,12 @@ class _SpaceEditDialogState extends ConsumerState<SpaceEditDialog> {
late TextEditingController _topicCtrl;
bool _saving = false;
String? _error;
bool _saved = false;
@override
void initState() {
super.initState();
_nameCtrl = TextEditingController(text: widget.space.getLocalizedDisplayname());
_topicCtrl = TextEditingController(text: widget.space.topic ?? '');
_topicCtrl = TextEditingController(text: widget.space.topic);
}
@override
@@ -535,17 +534,17 @@ class _SpaceEditDialogState extends ConsumerState<SpaceEditDialog> {
}
Future<void> _save() async {
setState(() { _saving = true; _error = null; _saved = false; });
setState(() { _saving = true; _error = null; });
try {
final name = _nameCtrl.text.trim();
final topic = _topicCtrl.text.trim();
if (name.isNotEmpty && name != widget.space.getLocalizedDisplayname()) {
await widget.space.setName(name);
}
if (topic != (widget.space.topic ?? '')) {
if (topic != widget.space.topic) {
await widget.space.setDescription(topic);
}
if (mounted) setState(() { _saving = false; _saved = true; });
if (mounted) setState(() { _saving = false; });
await Future.delayed(const Duration(seconds: 1));
if (mounted) Navigator.of(context).pop(true);
} catch (e) {
@@ -674,7 +673,7 @@ class _RoomSettingsDialogState extends ConsumerState<RoomSettingsDialog> {
void initState() {
super.initState();
_nameCtrl = TextEditingController(text: widget.room.getLocalizedDisplayname());
_topicCtrl = TextEditingController(text: widget.room.topic ?? '');
_topicCtrl = TextEditingController(text: widget.room.topic);
}
@override
@@ -691,7 +690,7 @@ class _RoomSettingsDialogState extends ConsumerState<RoomSettingsDialog> {
await widget.room.setName(_nameCtrl.text.trim());
}
final newTopic = _topicCtrl.text.trim();
if (newTopic != (widget.room.topic ?? '')) {
if (newTopic != widget.room.topic) {
await widget.room.setDescription(newTopic);
}
if (mounted) Navigator.of(context).pop();