fluffychat merge
This commit is contained in:
commit
df7cccdd3b
9 changed files with 5 additions and 95 deletions
2
.github/workflows/versions.env
vendored
2
.github/workflows/versions.env
vendored
|
|
@ -1,2 +1,2 @@
|
|||
FLUTTER_VERSION=3.35.7
|
||||
FLUTTER_VERSION=3.38.1
|
||||
JAVA_VERSION=17
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
|
|
@ -39,9 +38,6 @@ import '../../config/setting_keys.dart';
|
|||
import '../../utils/url_launcher.dart';
|
||||
import '../../widgets/matrix.dart';
|
||||
|
||||
import 'package:fluffychat/utils/tor_stub.dart'
|
||||
if (dart.library.html) 'package:tor_detector_web/tor_detector_web.dart';
|
||||
|
||||
enum PopupMenuAction {
|
||||
settings,
|
||||
invite,
|
||||
|
|
@ -416,8 +412,6 @@ class ChatListController extends State<ChatList>
|
|||
if (unfocus) searchFocusNode.unfocus();
|
||||
}
|
||||
|
||||
bool isTorBrowser = false;
|
||||
|
||||
BoxConstraints? snappingSheetContainerSize;
|
||||
|
||||
final ScrollController scrollController = ScrollController();
|
||||
|
|
@ -556,8 +550,6 @@ class ChatListController extends State<ChatList>
|
|||
);
|
||||
});
|
||||
|
||||
_checkTorBrowser();
|
||||
|
||||
//#Pangea
|
||||
_invitedSpaceSubscription = Matrix.of(context)
|
||||
.client
|
||||
|
|
@ -1214,12 +1206,6 @@ class ChatListController extends State<ChatList>
|
|||
ChatList.contextForVoip = context;
|
||||
}
|
||||
|
||||
Future<void> _checkTorBrowser() async {
|
||||
if (!kIsWeb) return;
|
||||
final isTor = await TorBrowserDetector.isTorBrowser;
|
||||
isTorBrowser = isTor;
|
||||
}
|
||||
|
||||
Future<void> dehydrate() => Matrix.of(context).dehydrateAction(context);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@ class ChatListViewBody extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
// #Pangea
|
||||
// final theme = Theme.of(context);
|
||||
// Pangea#
|
||||
|
||||
final client = Matrix.of(context).client;
|
||||
final activeSpace = controller.activeSpaceId;
|
||||
|
|
@ -152,25 +154,6 @@ class ChatListViewBody extends StatelessWidget {
|
|||
// onStatusEdit: controller.setStatus,
|
||||
// ),
|
||||
// ),
|
||||
// Pangea#
|
||||
AnimatedContainer(
|
||||
height: controller.isTorBrowser ? 64 : 0,
|
||||
duration: FluffyThemes.animationDuration,
|
||||
curve: FluffyThemes.animationCurve,
|
||||
clipBehavior: Clip.hardEdge,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Material(
|
||||
color: theme.colorScheme.surface,
|
||||
child: ListTile(
|
||||
leading: const Icon(Icons.vpn_key),
|
||||
title: Text(L10n.of(context).dehydrateTor),
|
||||
subtitle: Text(L10n.of(context).dehydrateTorLong),
|
||||
trailing: const Icon(Icons.chevron_right_outlined),
|
||||
onTap: controller.dehydrate,
|
||||
),
|
||||
),
|
||||
),
|
||||
// #Pangea
|
||||
// if (client.rooms.isNotEmpty && !controller.isSearchMode)
|
||||
// SizedBox(
|
||||
// height: 64,
|
||||
|
|
|
|||
|
|
@ -19,9 +19,6 @@ import 'package:fluffychat/widgets/adaptive_dialogs/show_ok_cancel_alert_dialog.
|
|||
import 'package:fluffychat/widgets/matrix.dart';
|
||||
import '../../utils/localized_exception_extension.dart';
|
||||
|
||||
import 'package:fluffychat/utils/tor_stub.dart'
|
||||
if (dart.library.html) 'package:tor_detector_web/tor_detector_web.dart';
|
||||
|
||||
class HomeserverPicker extends StatefulWidget {
|
||||
final bool addMultiAccount;
|
||||
const HomeserverPicker({required this.addMultiAccount, super.key});
|
||||
|
|
@ -42,15 +39,6 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
|||
|
||||
String? error;
|
||||
|
||||
bool isTorBrowser = false;
|
||||
|
||||
Future<void> _checkTorBrowser() async {
|
||||
if (!kIsWeb) return;
|
||||
|
||||
final isTor = await TorBrowserDetector.isTorBrowser;
|
||||
isTorBrowser = isTor;
|
||||
}
|
||||
|
||||
/// Starts an analysis of the given homeserver. It uses the current domain and
|
||||
/// makes sure that it is prefixed with https. Then it searches for the
|
||||
/// well-known information and forwards to the login page depending on the
|
||||
|
|
@ -175,12 +163,6 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
|||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_checkTorBrowser();
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => HomeserverPickerView(this);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import 'package:fluffychat/l10n/l10n.dart';
|
|||
import 'package:fluffychat/widgets/adaptive_dialogs/adaptive_dialog_action.dart';
|
||||
import 'package:fluffychat/widgets/layouts/login_scaffold.dart';
|
||||
import 'package:fluffychat/widgets/matrix.dart';
|
||||
import '../../config/themes.dart';
|
||||
import 'homeserver_picker.dart';
|
||||
|
||||
class HomeserverPickerView extends StatelessWidget {
|
||||
|
|
@ -84,30 +83,6 @@ class HomeserverPickerView extends StatelessWidget {
|
|||
child: IntrinsicHeight(
|
||||
child: Column(
|
||||
children: [
|
||||
// display a prominent banner to import session for TOR browser
|
||||
// users. This feature is just some UX sugar as TOR users are
|
||||
// usually forced to logout as TOR browser is non-persistent
|
||||
AnimatedContainer(
|
||||
height: controller.isTorBrowser ? 64 : 0,
|
||||
duration: FluffyThemes.animationDuration,
|
||||
curve: FluffyThemes.animationCurve,
|
||||
clipBehavior: Clip.hardEdge,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Material(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
borderRadius: const BorderRadius.vertical(
|
||||
bottom: Radius.circular(8),
|
||||
),
|
||||
color: theme.colorScheme.surface,
|
||||
child: ListTile(
|
||||
leading: const Icon(Icons.vpn_key),
|
||||
title: Text(L10n.of(context).hydrateTor),
|
||||
subtitle: Text(L10n.of(context).hydrateTorLong),
|
||||
trailing: const Icon(Icons.chevron_right_outlined),
|
||||
onTap: controller.restoreBackup,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
/// Stub class for [TorBrowserDetector]
|
||||
///
|
||||
/// statically returns false as Tor **browser** can only be detected in a
|
||||
/// **browser**.
|
||||
abstract class TorBrowserDetector {
|
||||
static Future<bool> get isTorBrowser => Future.value(false);
|
||||
}
|
||||
|
|
@ -2473,14 +2473,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
tor_detector_web:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: tor_detector_web
|
||||
sha256: c4acbd6c0fecd2cd0e8fe00b1a37332422e041021a42488dfddcb3e7ec809b3f
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
translations_cleaner:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
|
|
|||
|
|
@ -86,7 +86,6 @@ dependencies:
|
|||
sqflite_common_ffi: ^2.3.6
|
||||
sqlcipher_flutter_libs: ^0.6.8
|
||||
swipe_to_action: ^0.3.0
|
||||
tor_detector_web: ^1.1.0
|
||||
unifiedpush: ^6.2.0
|
||||
unifiedpush_ui: ^0.2.0
|
||||
universal_html: ^2.2.4
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ platforms:
|
|||
parts:
|
||||
flutter-git:
|
||||
source: https://github.com/flutter/flutter.git
|
||||
source-tag: 3.35.7
|
||||
source-tag: 3.38.1
|
||||
source-depth: 1
|
||||
plugin: nil
|
||||
override-build: |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue