change: Remove wallpaper feature
This commit is contained in:
parent
1da3a1b250
commit
5d20185140
52 changed files with 0 additions and 313 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue