fluffychat merge
This commit is contained in:
commit
cb93164953
10 changed files with 89 additions and 53 deletions
|
|
@ -50,6 +50,7 @@
|
|||
<locale android:name="th"/>
|
||||
<locale android:name="tr"/>
|
||||
<locale android:name="uk"/>
|
||||
<locale android:name="uz"/>
|
||||
<locale android:name="vi"/>
|
||||
<locale android:name="yue"/>
|
||||
<locale android:name="zh"/>
|
||||
|
|
|
|||
|
|
@ -479,7 +479,12 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
);
|
||||
|
||||
sendingClient = Matrix.of(context).client;
|
||||
readMarkerEventId = room.hasNewMessages ? room.fullyRead : '';
|
||||
final lastEventThreadId =
|
||||
room.lastEvent?.relationshipType == RelationshipTypes.thread
|
||||
? room.lastEvent?.relationshipEventId
|
||||
: null;
|
||||
readMarkerEventId =
|
||||
room.hasNewMessages ? lastEventThreadId ?? room.fullyRead : '';
|
||||
WidgetsBinding.instance.addObserver(this);
|
||||
_tryLoadTimeline();
|
||||
if (kIsWeb) {
|
||||
|
|
@ -610,7 +615,11 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
loadTimelineFuture = _getTimeline();
|
||||
try {
|
||||
await loadTimelineFuture;
|
||||
if (initialEventId != null) scrollToEventId(initialEventId);
|
||||
// We launched the chat with a given initial event ID:
|
||||
if (initialEventId != null) {
|
||||
scrollToEventId(initialEventId);
|
||||
return;
|
||||
}
|
||||
|
||||
var readMarkerEventIndex = readMarkerEventId.isEmpty
|
||||
? -1
|
||||
|
|
|
|||
|
|
@ -252,18 +252,53 @@ class ChatListItem extends StatelessWidget {
|
|||
),
|
||||
const SizedBox(width: 4),
|
||||
],
|
||||
AnimatedContainer(
|
||||
width: typingText.isEmpty ? 0 : 18,
|
||||
AnimatedSize(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
decoration: const BoxDecoration(),
|
||||
duration: FluffyThemes.animationDuration,
|
||||
curve: FluffyThemes.animationCurve,
|
||||
padding: const EdgeInsets.only(right: 4),
|
||||
child: Icon(
|
||||
Icons.edit_outlined,
|
||||
color: theme.colorScheme.secondary,
|
||||
size: 14,
|
||||
),
|
||||
child: typingText.isNotEmpty
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(right: 4.0),
|
||||
child: Icon(
|
||||
Icons.edit_outlined,
|
||||
color: theme.colorScheme.secondary,
|
||||
size: 16,
|
||||
),
|
||||
)
|
||||
: room.lastEvent?.relationshipType ==
|
||||
RelationshipTypes.thread
|
||||
? Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(
|
||||
AppConfig.borderRadius,
|
||||
),
|
||||
),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 8.0),
|
||||
margin: const EdgeInsets.only(right: 4.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.message_outlined,
|
||||
size: 12,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
L10n.of(context).thread,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
),
|
||||
Expanded(
|
||||
child: room.isSpace && room.membership == Membership.join
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
|||
final result = await FlutterWebAuth2.authenticate(
|
||||
url: url.toString(),
|
||||
callbackUrlScheme: urlScheme,
|
||||
options: const FlutterWebAuth2Options(),
|
||||
options: FlutterWebAuth2Options(useWebview: PlatformInfos.isMobile),
|
||||
);
|
||||
final token = Uri.parse(result).queryParameters['loginToken'];
|
||||
if (token?.isEmpty ?? false) return;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
audioplayers_linux
|
||||
desktop_webview_window
|
||||
dynamic_color
|
||||
emoji_picker_flutter
|
||||
file_selector_linux
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import app_links
|
|||
import app_settings
|
||||
import audio_session
|
||||
import audioplayers_darwin
|
||||
import desktop_webview_window
|
||||
import device_info_plus
|
||||
import dynamic_color
|
||||
import emoji_picker_flutter
|
||||
|
|
@ -51,6 +52,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
|||
AppSettingsPlugin.register(with: registry.registrar(forPlugin: "AppSettingsPlugin"))
|
||||
AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
|
||||
AudioplayersDarwinPlugin.register(with: registry.registrar(forPlugin: "AudioplayersDarwinPlugin"))
|
||||
DesktopWebviewWindowPlugin.register(with: registry.registrar(forPlugin: "DesktopWebviewWindowPlugin"))
|
||||
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
|
||||
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
|
||||
EmojiPickerFlutterPlugin.register(with: registry.registrar(forPlugin: "EmojiPickerFlutterPlugin"))
|
||||
|
|
|
|||
49
pubspec.lock
49
pubspec.lock
|
|
@ -465,6 +465,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.3"
|
||||
desktop_webview_window:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: desktop_webview_window
|
||||
sha256: "57cf20d81689d5cbb1adfd0017e96b669398a669d927906073b0e42fc64111c0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.2.3"
|
||||
device_info_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -546,13 +554,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.3"
|
||||
fcm_shared_isolate:
|
||||
dependency: "direct overridden"
|
||||
description:
|
||||
path: "pangea_packages/fcm_shared_isolate"
|
||||
relative: true
|
||||
source: path
|
||||
version: "0.2.0"
|
||||
ffi:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -873,14 +874,13 @@ packages:
|
|||
source: hosted
|
||||
version: "9.2.4"
|
||||
flutter_secure_storage_linux:
|
||||
dependency: "direct overridden"
|
||||
dependency: transitive
|
||||
description:
|
||||
path: flutter_secure_storage_linux
|
||||
ref: patch-2
|
||||
resolved-ref: f076cbb65b075afd6e3b648122987a67306dc298
|
||||
url: "https://github.com/m-berto/flutter_secure_storage.git"
|
||||
source: git
|
||||
version: "2.0.1"
|
||||
name: flutter_secure_storage_linux
|
||||
sha256: be76c1d24a97d0b98f8b54bce6b481a380a6590df992d0098f868ad54dc8f688
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.3"
|
||||
flutter_secure_storage_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -890,13 +890,13 @@ packages:
|
|||
source: hosted
|
||||
version: "3.1.3"
|
||||
flutter_secure_storage_platform_interface:
|
||||
dependency: "direct overridden"
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_platform_interface
|
||||
sha256: b8337d3d52e429e6c0a7710e38cf9742a3bb05844bd927450eb94f80c11ef85d
|
||||
sha256: cf91ad32ce5adef6fba4d736a542baca9daf3beac4db2d04be350b87f69ac4a8
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "1.1.2"
|
||||
flutter_secure_storage_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -953,20 +953,19 @@ packages:
|
|||
flutter_web_auth_2:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: flutter_web_auth_2
|
||||
ref: "3.x-without-v1"
|
||||
resolved-ref: "48682f19576001e50104a602d891343850adb67f"
|
||||
url: "https://github.com/ThexXTURBOXx/flutter_web_auth_2.git"
|
||||
source: git
|
||||
version: "3.1.2-without-v1"
|
||||
name: flutter_web_auth_2
|
||||
sha256: "3c14babeaa066c371f3a743f204dd0d348b7d42ffa6fae7a9847a521aff33696"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.1.0"
|
||||
flutter_web_auth_2_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_web_auth_2_platform_interface
|
||||
sha256: e8669e262005a8354389ba2971f0fc1c36188481234ff50d013aaf993f30f739
|
||||
sha256: c63a472c8070998e4e422f6b34a17070e60782ac442107c70000dd1bed645f4d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.0"
|
||||
version: "4.1.0"
|
||||
flutter_web_plugins:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
|
|
|
|||
17
pubspec.yaml
17
pubspec.yaml
|
|
@ -47,7 +47,7 @@ dependencies:
|
|||
flutter_secure_storage: ^9.2.4
|
||||
flutter_shortcuts_new: ^2.0.0
|
||||
flutter_vodozemac: ^0.4.1
|
||||
flutter_web_auth_2: ^3.1.1 # Version 4 blocked by https://github.com/MixinNetwork/flutter-plugins/issues/379
|
||||
flutter_web_auth_2: ^4.1.0
|
||||
flutter_webrtc: ^1.2.0
|
||||
geolocator: ^14.0.2
|
||||
go_router: ^17.0.0
|
||||
|
|
@ -175,18 +175,3 @@ flutter:
|
|||
# 2. Always link an (upstream?) issue
|
||||
# 3. Explain how and when this can be removed (overrides must be temporarily)
|
||||
dependency_overrides:
|
||||
fcm_shared_isolate:
|
||||
path: pangea_packages/fcm_shared_isolate
|
||||
# https://github.com/juliansteenbakker/flutter_secure_storage/issues/920
|
||||
flutter_secure_storage_linux:
|
||||
git:
|
||||
url: https://github.com/m-berto/flutter_secure_storage.git
|
||||
ref: patch-2
|
||||
path: flutter_secure_storage_linux
|
||||
flutter_secure_storage_platform_interface: 2.0.0
|
||||
# https://github.com/ThexXTURBOXx/flutter_web_auth_2/issues/155
|
||||
flutter_web_auth_2:
|
||||
git:
|
||||
url: https://github.com/ThexXTURBOXx/flutter_web_auth_2.git
|
||||
ref: 3.x-without-v1
|
||||
path: flutter_web_auth_2
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <app_links/app_links_plugin_c_api.h>
|
||||
#include <audioplayers_windows/audioplayers_windows_plugin.h>
|
||||
#include <desktop_webview_window/desktop_webview_window_plugin.h>
|
||||
#include <dynamic_color/dynamic_color_plugin_c_api.h>
|
||||
#include <emoji_picker_flutter/emoji_picker_flutter_plugin_c_api.h>
|
||||
#include <file_selector_windows/file_selector_windows.h>
|
||||
|
|
@ -33,6 +34,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
|||
registry->GetRegistrarForPlugin("AppLinksPluginCApi"));
|
||||
AudioplayersWindowsPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("AudioplayersWindowsPlugin"));
|
||||
DesktopWebviewWindowPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("DesktopWebviewWindowPlugin"));
|
||||
DynamicColorPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
|
||||
EmojiPickerFlutterPluginCApiRegisterWithRegistrar(
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
app_links
|
||||
audioplayers_windows
|
||||
desktop_webview_window
|
||||
dynamic_color
|
||||
emoji_picker_flutter
|
||||
file_selector_windows
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue