Merge pull request #159 from pangeachat/new_branch3

Archive Button edited
pull/1091/head
ggurdin 2 years ago committed by GitHub
commit 9acd4875db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -510,9 +510,7 @@ class ChatDetailsView extends StatelessWidget {
: AddToClassMode.chat, : AddToClassMode.chat,
), ),
const Divider(height: 1), const Divider(height: 1),
if (!room.isDirectChat && if (!room.isDirectChat)
(!room.isSpace ||
(room.isSpace && room.isRoomAdmin)))
ListTile( ListTile(
title: Text( title: Text(
room.isSpace room.isSpace

@ -45,6 +45,7 @@ class _SpaceViewState extends State<SpaceView> {
bool loading = false; bool loading = false;
// #Pangea // #Pangea
StreamSubscription<SyncUpdate>? _roomSubscription; StreamSubscription<SyncUpdate>? _roomSubscription;
bool refreshing = false;
// Pangea# // Pangea#
@override @override
@ -377,15 +378,17 @@ class _SpaceViewState extends State<SpaceView> {
} }
// #Pangea // #Pangea
void refreshOnUpdate(SyncUpdate event) { Future<void> refreshOnUpdate(SyncUpdate event) async {
/* refresh on leave, invite, and space child update /* refresh on leave, invite, and space child update
not join events, because there's already a listener on not join events, because there's already a listener on
onTapSpaceChild, and they interfere with each other */ onTapSpaceChild, and they interfere with each other */
if (widget.controller.activeSpaceId == null || !mounted) { if (widget.controller.activeSpaceId == null || !mounted || refreshing) {
return; return;
} }
setState(() => refreshing = true);
final client = Matrix.of(context).client; final client = Matrix.of(context).client;
if (event.isMembershipUpdateByType( if (mounted &&
event.isMembershipUpdateByType(
Membership.leave, Membership.leave,
client.userID!, client.userID!,
) || ) ||
@ -396,8 +399,9 @@ class _SpaceViewState extends State<SpaceView> {
event.isSpaceChildUpdate( event.isSpaceChildUpdate(
widget.controller.activeSpaceId!, widget.controller.activeSpaceId!,
)) { )) {
_refresh(); await loadHierarchy();
} }
setState(() => refreshing = false);
} }
// Pangea# // Pangea#

@ -6,7 +6,6 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <desktop_lifecycle/desktop_lifecycle_plugin.h>
#include <dynamic_color/dynamic_color_plugin.h> #include <dynamic_color/dynamic_color_plugin.h>
#include <emoji_picker_flutter/emoji_picker_flutter_plugin.h> #include <emoji_picker_flutter/emoji_picker_flutter_plugin.h>
#include <file_selector_linux/file_selector_plugin.h> #include <file_selector_linux/file_selector_plugin.h>
@ -20,9 +19,6 @@
#include <window_to_front/window_to_front_plugin.h> #include <window_to_front/window_to_front_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) { void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) desktop_lifecycle_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "DesktopLifecyclePlugin");
desktop_lifecycle_plugin_register_with_registrar(desktop_lifecycle_registrar);
g_autoptr(FlPluginRegistrar) dynamic_color_registrar = g_autoptr(FlPluginRegistrar) dynamic_color_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin");
dynamic_color_plugin_register_with_registrar(dynamic_color_registrar); dynamic_color_plugin_register_with_registrar(dynamic_color_registrar);

@ -3,7 +3,6 @@
# #
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
desktop_lifecycle
dynamic_color dynamic_color
emoji_picker_flutter emoji_picker_flutter
file_selector_linux file_selector_linux

@ -7,8 +7,6 @@ import Foundation
import appkit_ui_element_colors import appkit_ui_element_colors
import audio_session import audio_session
import connectivity_plus
import desktop_lifecycle
import device_info_plus import device_info_plus
import dynamic_color import dynamic_color
import emoji_picker_flutter import emoji_picker_flutter
@ -30,7 +28,7 @@ import package_info_plus
import pasteboard import pasteboard
import path_provider_foundation import path_provider_foundation
import purchases_flutter import purchases_flutter
import record_darwin import record_macos
import sentry_flutter import sentry_flutter
import share_plus import share_plus
import shared_preferences_foundation import shared_preferences_foundation
@ -45,8 +43,6 @@ import window_to_front
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AppkitUiElementColorsPlugin.register(with: registry.registrar(forPlugin: "AppkitUiElementColorsPlugin")) AppkitUiElementColorsPlugin.register(with: registry.registrar(forPlugin: "AppkitUiElementColorsPlugin"))
AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin")) AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
DesktopLifecyclePlugin.register(with: registry.registrar(forPlugin: "DesktopLifecyclePlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin")) DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
EmojiPickerFlutterPlugin.register(with: registry.registrar(forPlugin: "EmojiPickerFlutterPlugin")) EmojiPickerFlutterPlugin.register(with: registry.registrar(forPlugin: "EmojiPickerFlutterPlugin"))
@ -68,7 +64,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
PasteboardPlugin.register(with: registry.registrar(forPlugin: "PasteboardPlugin")) PasteboardPlugin.register(with: registry.registrar(forPlugin: "PasteboardPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
PurchasesFlutterPlugin.register(with: registry.registrar(forPlugin: "PurchasesFlutterPlugin")) PurchasesFlutterPlugin.register(with: registry.registrar(forPlugin: "PurchasesFlutterPlugin"))
RecordPlugin.register(with: registry.registrar(forPlugin: "RecordPlugin")) RecordMacosPlugin.register(with: registry.registrar(forPlugin: "RecordMacosPlugin"))
SentryFlutterPlugin.register(with: registry.registrar(forPlugin: "SentryFlutterPlugin")) SentryFlutterPlugin.register(with: registry.registrar(forPlugin: "SentryFlutterPlugin"))
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))

@ -6,8 +6,6 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <connectivity_plus/connectivity_plus_windows_plugin.h>
#include <desktop_lifecycle/desktop_lifecycle_plugin.h>
#include <dynamic_color/dynamic_color_plugin_c_api.h> #include <dynamic_color/dynamic_color_plugin_c_api.h>
#include <emoji_picker_flutter/emoji_picker_flutter_plugin_c_api.h> #include <emoji_picker_flutter/emoji_picker_flutter_plugin_c_api.h>
#include <file_selector_windows/file_selector_windows.h> #include <file_selector_windows/file_selector_windows.h>
@ -24,10 +22,6 @@
#include <window_to_front/window_to_front_plugin.h> #include <window_to_front/window_to_front_plugin.h>
void RegisterPlugins(flutter::PluginRegistry* registry) { void RegisterPlugins(flutter::PluginRegistry* registry) {
ConnectivityPlusWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
DesktopLifecyclePluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("DesktopLifecyclePlugin"));
DynamicColorPluginCApiRegisterWithRegistrar( DynamicColorPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("DynamicColorPluginCApi")); registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
EmojiPickerFlutterPluginCApiRegisterWithRegistrar( EmojiPickerFlutterPluginCApiRegisterWithRegistrar(

@ -3,8 +3,6 @@
# #
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
connectivity_plus
desktop_lifecycle
dynamic_color dynamic_color
emoji_picker_flutter emoji_picker_flutter
file_selector_windows file_selector_windows

Loading…
Cancel
Save