Merge pull request #159 from pangeachat/new_branch3
Archive Button edited
This commit is contained in:
commit
9acd4875db
7 changed files with 14 additions and 29 deletions
|
|
@ -510,9 +510,7 @@ class ChatDetailsView extends StatelessWidget {
|
|||
: AddToClassMode.chat,
|
||||
),
|
||||
const Divider(height: 1),
|
||||
if (!room.isDirectChat &&
|
||||
(!room.isSpace ||
|
||||
(room.isSpace && room.isRoomAdmin)))
|
||||
if (!room.isDirectChat)
|
||||
ListTile(
|
||||
title: Text(
|
||||
room.isSpace
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ class _SpaceViewState extends State<SpaceView> {
|
|||
bool loading = false;
|
||||
// #Pangea
|
||||
StreamSubscription<SyncUpdate>? _roomSubscription;
|
||||
bool refreshing = false;
|
||||
// Pangea#
|
||||
|
||||
@override
|
||||
|
|
@ -377,18 +378,20 @@ class _SpaceViewState extends State<SpaceView> {
|
|||
}
|
||||
|
||||
// #Pangea
|
||||
void refreshOnUpdate(SyncUpdate event) {
|
||||
Future<void> refreshOnUpdate(SyncUpdate event) async {
|
||||
/* refresh on leave, invite, and space child update
|
||||
not join events, because there's already a listener on
|
||||
onTapSpaceChild, and they interfere with each other */
|
||||
if (widget.controller.activeSpaceId == null || !mounted) {
|
||||
if (widget.controller.activeSpaceId == null || !mounted || refreshing) {
|
||||
return;
|
||||
}
|
||||
setState(() => refreshing = true);
|
||||
final client = Matrix.of(context).client;
|
||||
if (event.isMembershipUpdateByType(
|
||||
Membership.leave,
|
||||
client.userID!,
|
||||
) ||
|
||||
if (mounted &&
|
||||
event.isMembershipUpdateByType(
|
||||
Membership.leave,
|
||||
client.userID!,
|
||||
) ||
|
||||
event.isMembershipUpdateByType(
|
||||
Membership.invite,
|
||||
client.userID!,
|
||||
|
|
@ -396,8 +399,9 @@ class _SpaceViewState extends State<SpaceView> {
|
|||
event.isSpaceChildUpdate(
|
||||
widget.controller.activeSpaceId!,
|
||||
)) {
|
||||
_refresh();
|
||||
await loadHierarchy();
|
||||
}
|
||||
setState(() => refreshing = false);
|
||||
}
|
||||
// Pangea#
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include "generated_plugin_registrant.h"
|
||||
|
||||
#include <desktop_lifecycle/desktop_lifecycle_plugin.h>
|
||||
#include <dynamic_color/dynamic_color_plugin.h>
|
||||
#include <emoji_picker_flutter/emoji_picker_flutter_plugin.h>
|
||||
#include <file_selector_linux/file_selector_plugin.h>
|
||||
|
|
@ -20,9 +19,6 @@
|
|||
#include <window_to_front/window_to_front_plugin.h>
|
||||
|
||||
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 =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin");
|
||||
dynamic_color_plugin_register_with_registrar(dynamic_color_registrar);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
#
|
||||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
desktop_lifecycle
|
||||
dynamic_color
|
||||
emoji_picker_flutter
|
||||
file_selector_linux
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ import Foundation
|
|||
|
||||
import appkit_ui_element_colors
|
||||
import audio_session
|
||||
import connectivity_plus
|
||||
import desktop_lifecycle
|
||||
import device_info_plus
|
||||
import dynamic_color
|
||||
import emoji_picker_flutter
|
||||
|
|
@ -30,7 +28,7 @@ import package_info_plus
|
|||
import pasteboard
|
||||
import path_provider_foundation
|
||||
import purchases_flutter
|
||||
import record_darwin
|
||||
import record_macos
|
||||
import sentry_flutter
|
||||
import share_plus
|
||||
import shared_preferences_foundation
|
||||
|
|
@ -45,8 +43,6 @@ import window_to_front
|
|||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
AppkitUiElementColorsPlugin.register(with: registry.registrar(forPlugin: "AppkitUiElementColorsPlugin"))
|
||||
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"))
|
||||
DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin"))
|
||||
EmojiPickerFlutterPlugin.register(with: registry.registrar(forPlugin: "EmojiPickerFlutterPlugin"))
|
||||
|
|
@ -68,7 +64,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
|||
PasteboardPlugin.register(with: registry.registrar(forPlugin: "PasteboardPlugin"))
|
||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||
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"))
|
||||
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
|
||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
#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 <emoji_picker_flutter/emoji_picker_flutter_plugin_c_api.h>
|
||||
#include <file_selector_windows/file_selector_windows.h>
|
||||
|
|
@ -24,10 +22,6 @@
|
|||
#include <window_to_front/window_to_front_plugin.h>
|
||||
|
||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
ConnectivityPlusWindowsPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
|
||||
DesktopLifecyclePluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("DesktopLifecyclePlugin"));
|
||||
DynamicColorPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
|
||||
EmojiPickerFlutterPluginCApiRegisterWithRegistrar(
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@
|
|||
#
|
||||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
connectivity_plus
|
||||
desktop_lifecycle
|
||||
dynamic_color
|
||||
emoji_picker_flutter
|
||||
file_selector_windows
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue