change: Remove wallpaper feature

This commit is contained in:
krille-chan 2023-12-26 14:37:39 +01:00
parent 1da3a1b250
commit 5d20185140
No known key found for this signature in database
52 changed files with 0 additions and 313 deletions

View file

@ -226,11 +226,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "غيِّر الخلفية",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"channelCorruptedDecryptError": "فسُد التشفير",
"@channelCorruptedDecryptError": {
"type": "text",

View file

@ -1132,11 +1132,6 @@
"username": {}
}
},
"changeWallpaper": "",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"moderator": "",
"@moderator": {
"type": "text",

View file

@ -1133,11 +1133,6 @@
"username": {}
}
},
"changeWallpaper": "",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"moderator": "",
"@moderator": {
"type": "text",

View file

@ -249,11 +249,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Canvia el fons",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"channelCorruptedDecryptError": "El xifratge sha corromput",
"@channelCorruptedDecryptError": {
"type": "text",

View file

@ -299,11 +299,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Změnit pozadí",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeYourAvatar": "Změňte svůj avatar",
"@changeYourAvatar": {
"type": "text",

View file

@ -294,11 +294,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Hintergrund ändern",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeYourAvatar": "Deinen Avatar ändern",
"@changeYourAvatar": {
"type": "text",

View file

@ -1133,11 +1133,6 @@
"username": {}
}
},
"changeWallpaper": "",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"moderator": "",
"@moderator": {
"type": "text",

View file

@ -348,11 +348,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Change wallpaper",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeYourAvatar": "Change your avatar",
"@changeYourAvatar": {
"type": "text",

View file

@ -293,11 +293,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Ŝanĝi fonbildon",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeYourAvatar": "Ŝanĝi vian profilbildon",
"@changeYourAvatar": {
"type": "text",

View file

@ -267,11 +267,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Cambiar el fondo de pantalla",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"channelCorruptedDecryptError": "El cifrado se ha corrompido",
"@channelCorruptedDecryptError": {
"type": "text",

View file

@ -299,11 +299,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Muuda taustapilti",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeYourAvatar": "Muuda oma tunnuspilti",
"@changeYourAvatar": {
"type": "text",

View file

@ -226,11 +226,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Aldatu horma-irudia",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"channelCorruptedDecryptError": "Zifraketa hondatu egin da",
"@channelCorruptedDecryptError": {
"type": "text",

View file

@ -338,11 +338,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "کاغذدیواری را تغییر دهید",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeYourAvatar": "عکس پروفایل خود را تغییر دهید",
"@changeYourAvatar": {
"type": "text",

View file

@ -935,11 +935,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Vaihda taustakuva",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeYourAvatar": "Vaihda profiilikuvasi",
"@changeYourAvatar": {
"type": "text",

View file

@ -301,11 +301,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Changer l'image de fond",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeYourAvatar": "Changer votre avatar",
"@changeYourAvatar": {
"type": "text",

View file

@ -420,11 +420,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Athraigh cúlbhrat",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changedTheChatAvatar": "D'athraigh {username} abhatár an chomhrá",
"@changedTheChatAvatar": {
"type": "text",

View file

@ -299,11 +299,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Cambiar imaxe de fondo",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeYourAvatar": "Cambia o avatar",
"@changeYourAvatar": {
"type": "text",

View file

@ -138,11 +138,6 @@
"username": {}
}
},
"changeWallpaper": "שנה טפט",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changedTheChatNameTo": "{username} שינה את שם הצ'אט ל: '{chatname}'",
"@changedTheChatNameTo": {
"type": "text",

View file

@ -1133,11 +1133,6 @@
"username": {}
}
},
"changeWallpaper": "",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"moderator": "",
"@moderator": {
"type": "text",

View file

@ -289,11 +289,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Promijeni sliku pozadine",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeYourAvatar": "Promijeni svoj avatar",
"@changeYourAvatar": {
"type": "text",

View file

@ -236,11 +236,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Háttér módosítása",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"channelCorruptedDecryptError": "A titkosítás megsérült",
"@channelCorruptedDecryptError": {
"type": "text",

View file

@ -470,11 +470,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Ubah wallpaper",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeTheNameOfTheGroup": "Ubah nama grup",
"@changeTheNameOfTheGroup": {
"type": "text",

View file

@ -630,11 +630,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Cambiar li tapete",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"clearArchive": "Vacuar li archive",
"@clearArchive": {},
"commandHint_clearcache": "Vacuar li cache",

View file

@ -281,11 +281,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Cambia sfondo",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"channelCorruptedDecryptError": "La crittografia è corrotta",
"@channelCorruptedDecryptError": {
"type": "text",

View file

@ -282,11 +282,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "壁紙を変更する",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"channelCorruptedDecryptError": "暗号が破損しています",
"@channelCorruptedDecryptError": {
"type": "text",

View file

@ -495,11 +495,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "배경 바꾸기",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeTheNameOfTheGroup": "그룹의 이름 바꾸기",
"@changeTheNameOfTheGroup": {
"type": "text",

View file

@ -490,11 +490,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Keisti ekrano užsklandą",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeYourAvatar": "Keisti savo avatarą",
"@changeYourAvatar": {
"type": "text",

View file

@ -1133,11 +1133,6 @@
"username": {}
}
},
"changeWallpaper": "",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"moderator": "",
"@moderator": {
"type": "text",

View file

@ -255,11 +255,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Endre bakgrunnsbilde",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"channelCorruptedDecryptError": "Krypteringen er skadet",
"@channelCorruptedDecryptError": {
"type": "text",

View file

@ -300,11 +300,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Achtergrond wijzigen",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeYourAvatar": "Jouw avatar veranderen",
"@changeYourAvatar": {
"type": "text",

View file

@ -272,11 +272,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Zmień tapetę",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"channelCorruptedDecryptError": "Szyfrowanie zostało uszkodzone",
"@channelCorruptedDecryptError": {
"type": "text",

View file

@ -1185,11 +1185,6 @@
"username": {}
}
},
"changeWallpaper": "",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"moderator": "",
"@moderator": {
"type": "text",

View file

@ -298,11 +298,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Alterar o pano de fundo",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeYourAvatar": "Alterar seu avatar",
"@changeYourAvatar": {
"type": "text",

View file

@ -253,11 +253,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Alterar o fundo",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeYourAvatar": "Alterar o teu avatar",
"@changeYourAvatar": {
"type": "text",

View file

@ -1717,11 +1717,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Schimbați imaginea de fundal",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"contentHasBeenReported": "Conținutul a fost reportat la administratori serverului",
"@contentHasBeenReported": {
"type": "text",

View file

@ -299,11 +299,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Изменить фон чатов",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeYourAvatar": "Изменить свой аватар",
"@changeYourAvatar": {
"type": "text",

View file

@ -219,11 +219,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Zmeniť pozadie",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"channelCorruptedDecryptError": "Šifrovanie bolo poškodené",
"@channelCorruptedDecryptError": {
"type": "text",

View file

@ -434,11 +434,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Spremeni ozadje",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changedTheHistoryVisibility": "{username} je spremenila vidnost zgodovine",
"@changedTheHistoryVisibility": {
"type": "text",

View file

@ -281,11 +281,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Измени тапет",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeYourAvatar": "Измените свој аватар",
"@changeYourAvatar": {
"type": "text",

View file

@ -263,11 +263,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Ändra bakgrund",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"channelCorruptedDecryptError": "Krypteringen har blivit korrupt",
"@channelCorruptedDecryptError": {
"type": "text",

View file

@ -1132,11 +1132,6 @@
"username": {}
}
},
"changeWallpaper": "",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"moderator": "",
"@moderator": {
"type": "text",

View file

@ -1260,11 +1260,6 @@
"username": {}
}
},
"changeWallpaper": "",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"moderator": "",
"@moderator": {
"type": "text",

View file

@ -301,11 +301,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Duvar kağıdını değiştir",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeYourAvatar": "Avatarınızı değiştirin",
"@changeYourAvatar": {
"type": "text",

View file

@ -226,11 +226,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Змінити тло",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"channelCorruptedDecryptError": "Шифрування було пошкоджено",
"@channelCorruptedDecryptError": {
"type": "text",

View file

@ -277,11 +277,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "Thay hình nền",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeTheNameOfTheGroup": "Thay đổi tên nhóm",
"@changeTheNameOfTheGroup": {
"type": "text",

View file

@ -282,11 +282,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "更改壁纸",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"changeYourAvatar": "更改你的头像",
"@changeYourAvatar": {
"type": "text",

View file

@ -281,11 +281,6 @@
"type": "text",
"placeholders": {}
},
"changeWallpaper": "變更聊天背景",
"@changeWallpaper": {
"type": "text",
"placeholders": {}
},
"channelCorruptedDecryptError": "加密已被破壞",
"@channelCorruptedDecryptError": {
"type": "text",

View file

@ -1,5 +1,4 @@
abstract class SettingKeys {
static const String wallpaper = 'chat.fluffy.wallpaper';
static const String renderHtml = 'chat.fluffy.renderHtml';
static const String hideRedactedEvents = 'chat.fluffy.hideRedactedEvents';
static const String hideUnknownEvents = 'chat.fluffy.hideUnknownEvents';

View file

@ -198,14 +198,6 @@ class ChatView extends StatelessWidget {
onDragExited: controller.onDragExited,
child: Stack(
children: <Widget>[
if (Matrix.of(context).wallpaper != null)
Image.file(
Matrix.of(context).wallpaper!,
width: double.infinity,
height: double.infinity,
fit: BoxFit.cover,
filterQuality: FilterQuality.medium,
),
SafeArea(
child: Column(
children: <Widget>[

View file

@ -1,11 +1,7 @@
import 'package:flutter/material.dart';
import 'package:collection/collection.dart';
import 'package:file_picker/file_picker.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/config/setting_keys.dart';
import 'package:fluffychat/widgets/app_lock.dart';
import 'package:fluffychat/widgets/theme_builder.dart';
import '../../widgets/matrix.dart';
import 'settings_style_view.dart';
@ -18,28 +14,6 @@ class SettingsStyle extends StatefulWidget {
}
class SettingsStyleController extends State<SettingsStyle> {
void setWallpaperAction() async {
final picked = await AppLock.of(context).pauseWhile(
FilePicker.platform.pickFiles(
type: FileType.image,
withData: false,
),
);
final pickedFile = picked?.files.firstOrNull;
if (pickedFile == null) return;
await Matrix.of(context)
.store
.setString(SettingKeys.wallpaper, pickedFile.path!);
setState(() {});
}
void deleteWallpaperAction() async {
Matrix.of(context).wallpaper = null;
await Matrix.of(context).store.remove(SettingKeys.wallpaper);
setState(() {});
}
void setChatColor(Color? color) async {
AppConfig.colorSchemeSeed = color;
ThemeController.of(context).setPrimaryColor(color);

View file

@ -5,7 +5,6 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import '../../config/app_config.dart';
import '../../widgets/matrix.dart';
import 'settings_style.dart';
class SettingsStyleView extends StatelessWidget {
@ -16,7 +15,6 @@ class SettingsStyleView extends StatelessWidget {
@override
Widget build(BuildContext context) {
const colorPickerSize = 32.0;
final wallpaper = Matrix.of(context).wallpaper;
return Scaffold(
appBar: AppBar(
leading: const Center(child: BackButton()),
@ -159,41 +157,6 @@ class SettingsStyleView extends StatelessWidget {
onChanged: controller.switchTheme,
),
const Divider(height: 1),
ListTile(
title: Text(
L10n.of(context)!.wallpaper,
style: TextStyle(
color: Theme.of(context).colorScheme.secondary,
fontWeight: FontWeight.bold,
),
),
),
if (wallpaper != null)
ListTile(
title: Image.file(
wallpaper,
height: 38,
fit: BoxFit.cover,
),
trailing: const Icon(
Icons.delete_outlined,
color: Colors.red,
),
onTap: controller.deleteWallpaperAction,
),
Builder(
builder: (context) {
return ListTile(
title: Text(L10n.of(context)!.changeWallpaper),
trailing: Icon(
Icons.photo_outlined,
color: Theme.of(context).textTheme.bodyLarge?.color,
),
onTap: controller.setWallpaperAction,
);
},
),
const Divider(height: 1),
ListTile(
title: Text(
L10n.of(context)!.messagesStyle,

View file

@ -1,6 +1,5 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
@ -187,8 +186,6 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
final StreamController<Map<String, dynamic>?> onShareContentChanged =
StreamController.broadcast();
File? wallpaper;
void _initWithStore() async {
try {
if (client.isLogged()) {
@ -429,9 +426,6 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
}
void initSettings() {
final path = store.getString(SettingKeys.wallpaper);
if (path != null) wallpaper = File(path);
AppConfig.fontSizeFactor =
double.tryParse(store.getString(SettingKeys.fontSizeFactor) ?? '') ??
AppConfig.fontSizeFactor;