Browse Source

chore: FurryChat patches

yiffed
Inex Code 6 months ago
parent
commit
e0fd7ecd3b
11 changed files with 53 additions and 49 deletions
  1. +0
    -4
      lib/components/list_items/participant_list_item.dart
  2. +0
    -2
      lib/components/matrix.dart
  3. +5
    -5
      lib/components/user_bottom_sheet.dart
  4. +7
    -5
      lib/utils/famedlysdk_store.dart
  5. +3
    -2
      lib/utils/fluffy_share.dart
  6. +5
    -4
      lib/utils/matrix_file_extension.dart
  7. +1
    -1
      lib/views/chat.dart
  8. +1
    -4
      lib/views/chat_list.dart
  9. +9
    -7
      lib/views/homeserver_picker.dart
  10. +1
    -1
      lib/views/settings/settings_themes.dart
  11. +21
    -14
      pubspec.lock

+ 0
- 4
lib/components/list_items/participant_list_item.dart View File

@ -2,11 +2,7 @@ import 'package:famedlysdk/famedlysdk.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import '../../utils/app_route.dart';
import '../../views/chat.dart';
import '../avatar.dart';
import '../dialogs/simple_dialogs.dart';
import '../matrix.dart';
import '../user_bottom_sheet.dart';
class ParticipantListItem extends StatelessWidget {


+ 0
- 2
lib/components/matrix.dart View File

@ -19,8 +19,6 @@ import '../utils/famedlysdk_store.dart';
import '../utils/firebase_controller.dart';
import '../utils/matrix_locals.dart';
import '../utils/platform_infos.dart';
import '../utils/presence_extension.dart';
import '../utils/user_status.dart';
import '../views/key_verification.dart';
import 'avatar.dart';
import 'dialogs/simple_dialogs.dart';


+ 5
- 5
lib/components/user_bottom_sheet.dart View File

@ -1,15 +1,15 @@
import 'dart:math';
import 'package:famedlysdk/famedlysdk.dart';
import 'package:fluffychat/components/adaptive_page_layout.dart';
import 'package:fluffychat/utils/app_route.dart';
import 'package:fluffychat/utils/fluffy_share.dart';
import 'package:fluffychat/views/chat.dart';
import 'package:flutter/material.dart';
import 'content_banner.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import '../utils/app_route.dart';
import '../utils/fluffy_share.dart';
import '../utils/presence_extension.dart';
import '../views/chat.dart';
import 'adaptive_page_layout.dart';
import 'content_banner.dart';
import 'dialogs/simple_dialogs.dart';
import 'matrix.dart';


+ 7
- 5
lib/utils/famedlysdk_store.dart View File

@ -1,13 +1,15 @@
import '../famedlysdk.dart';
import './platform_infos.dart';
import 'dart:async';
import 'dart:core';
import 'package:famedlysdk/famedlysdk.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:localstorage/localstorage.dart';
import 'package:path_provider/path_provider.dart';
import 'dart:async';
import 'dart:core';
import './database/shared.dart';
import 'package:random_string/random_string.dart';
import './database/shared.dart';
import './platform_infos.dart';
Future<Database> getDatabase(Client client) async {
while (_generateDatabaseLock) {
await Future.delayed(Duration(milliseconds: 50));


+ 3
- 2
lib/utils/fluffy_share.dart View File

@ -1,9 +1,10 @@
import 'package:bot_toast/bot_toast.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:share/share.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:share/share.dart';
import 'platform_infos.dart';
abstract class FluffyShare {
static Future<void> share(String text, BuildContext context) async {


+ 5
- 4
lib/utils/matrix_file_extension.dart View File

@ -1,14 +1,15 @@
import 'dart:io';
import 'package:downloads_path_provider_28/downloads_path_provider_28.dart';
import 'package:famedlysdk/famedlysdk.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:flutter/foundation.dart';
import 'package:mime_type/mime_type.dart';
import 'package:open_file/open_file.dart';
import 'package:path_provider/path_provider.dart';
import 'package:universal_html/prefer_universal/html.dart' as html;
import 'package:mime_type/mime_type.dart';
import 'package:downloads_path_provider_28/downloads_path_provider_28.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:universal_html/prefer_universal/html.dart' as html;
import 'platform_infos.dart';
extension MatrixFileExtension on MatrixFile {
void open() async {


+ 1
- 1
lib/views/chat.dart View File

@ -25,8 +25,8 @@ import '../components/encryption_button.dart';
import '../components/input_bar.dart';
import '../components/list_items/message.dart';
import '../components/matrix.dart';
import '../components/user_bottom_sheet.dart';
import '../components/reply_content.dart';
import '../components/user_bottom_sheet.dart';
import '../config/app_emojis.dart';
import '../utils/app_route.dart';
import '../utils/matrix_file_extension.dart';


+ 1
- 4
lib/views/chat_list.dart View File

@ -9,16 +9,14 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:receive_sharing_intent/receive_sharing_intent.dart';
import '../components/adaptive_page_layout.dart';
import '../components/avatar.dart';
import '../components/connection_status_header.dart';
import '../components/dialogs/simple_dialogs.dart';
import '../components/list_items/chat_list_item.dart';
import '../components/list_items/public_room_list_item.dart';
import '../components/list_items/status_list_item.dart';
import '../components/matrix.dart';
import '../utils/app_route.dart';
import '../utils/matrix_file_extension.dart';
import '../utils/fluffy_share.dart';
import '../utils/matrix_file_extension.dart';
import '../utils/platform_infos.dart';
import '../utils/url_launcher.dart';
import 'archive.dart';
@ -26,7 +24,6 @@ import 'homeserver_picker.dart';
import 'new_group.dart';
import 'new_private_chat.dart';
import 'settings.dart';
import 'status_view.dart';
enum SelectMode { normal, share, select }


+ 9
- 7
lib/views/homeserver_picker.dart View File

@ -1,6 +1,6 @@
import 'dart:math';
import 'package:famedlysdk/matrix_api/model/well_known_informations.dart';
import 'package:famedlysdk/famedlysdk.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
@ -30,9 +30,10 @@ class _HomeserverPickerState extends State<HomeserverPicker> {
.client
.getWellKnownInformationsByUserId(homeserver));
final success = await SimpleDialogs(context).tryRequestWithLoadingDialog(
Matrix.of(context).client.checkServer(wellknown.mHomeserver != null
? 'https://${Uri.parse(wellknown.mHomeserver.baseUrl).host}'
: homeserver));
Matrix.of(context).client.checkHomeserver(
wellknown.mHomeserver != null
? 'https://${Uri.parse(wellknown.mHomeserver.baseUrl).host}'
: homeserver));
if (success != false) {
await Navigator.of(context).push(AppRoute(Login(
username: homeserver,
@ -50,9 +51,10 @@ class _HomeserverPickerState extends State<HomeserverPicker> {
.getWellKnownInformationsByDomain(homeserver));
final success = await SimpleDialogs(context).tryRequestWithLoadingDialog(
Matrix.of(context).client.checkServer(wellknown.mHomeserver != null
? 'https://${Uri.parse(wellknown.mHomeserver.baseUrl).host}'
: homeserver));
Matrix.of(context).client.checkHomeserver(
wellknown.mHomeserver != null
? 'https://${Uri.parse(wellknown.mHomeserver.baseUrl).host}'
: homeserver));
if (success != false) {
await Navigator.of(context).push(AppRoute(SignUp(
wellknown: wellknown,


+ 1
- 1
lib/views/settings/settings_themes.dart View File

@ -41,7 +41,7 @@ class _ThemesSettingsState extends State<ThemesSettings> {
void deleteWallpaperAction(BuildContext context) async {
Matrix.of(context).wallpaper = null;
await Matrix.of(context).store.setItem('chat.fluffy.wallpaper', null);
await Matrix.of(context).store.deleteItem('chat.fluffy.wallpaper');
setState(() => null);
}


+ 21
- 14
pubspec.lock View File

@ -216,7 +216,7 @@ packages:
description:
path: "."
ref: yiffed
resolved-ref: d9bc92d6543e51845ef384ee7650fcb3428d0718
resolved-ref: "0f5943382e8d08da9a3c019e75982d8dcc08d4a8"
url: "https://github.com/innereq/famedlysdk-fork.git"
source: git
version: "0.0.1"
@ -247,14 +247,21 @@ packages:
name: file_picker
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.7"
version: "1.13.3"
file_picker_cross:
dependency: "direct main"
description:
name: file_picker_cross
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.4"
version: "4.2.2"
file_picker_platform_interface:
dependency: transitive
description:
name: file_picker_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
firebase:
dependency: transitive
description:
@ -512,7 +519,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3-nullsafety.1"
version: "0.6.3-nullsafety.2"
localstorage:
dependency: "direct main"
description:
@ -588,7 +595,7 @@ packages:
description:
path: "."
ref: master
resolved-ref: c8eb59c25c4e3a568bd64e4722108ec45259e157
resolved-ref: "42a0fa3d4643d1e0402f6ac599dff7062aff754f"
url: "https://gitlab.com/famedly/libraries/native_imaging.git"
source: git
version: "0.0.1"
@ -703,7 +710,7 @@ packages:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0-nullsafety.2"
permission_handler:
dependency: "direct main"
description:
@ -759,7 +766,7 @@ packages:
name: pool
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.0-nullsafety.1"
version: "1.5.0-nullsafety.2"
process:
dependency: transitive
description:
@ -780,7 +787,7 @@ packages:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
version: "2.1.4+1"
random_string:
dependency: "direct main"
description:
@ -855,14 +862,14 @@ packages:
name: source_map_stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.2"
version: "2.1.0-nullsafety.3"
source_maps:
dependency: transitive
description:
name: source_maps
url: "https://pub.dartlang.org"
source: hosted
version: "0.10.10-nullsafety.1"
version: "0.10.10-nullsafety.2"
source_span:
dependency: transitive
description:
@ -876,7 +883,7 @@ packages:
name: sqflite
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.2"
version: "1.3.2+1"
sqflite_common:
dependency: transitive
description:
@ -1009,7 +1016,7 @@ packages:
name: url_launcher_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+1"
version: "0.0.1+3"
url_launcher_macos:
dependency: transitive
description:
@ -1058,7 +1065,7 @@ packages:
name: vm_service
url: "https://pub.dartlang.org"
source: hosted
version: "5.2.0"
version: "5.3.1"
watcher:
dependency: transitive
description:
@ -1123,5 +1130,5 @@ packages:
source: hosted
version: "0.1.2"
sdks:
dart: ">=2.10.2 <2.11.0"
dart: ">=2.10.2 <=2.11.0-161.0.dev"
flutter: ">=1.22.2 <2.0.0"

Loading…
Cancel
Save