Compare commits

..
Author SHA1 Message Date
01b13b4764
set min version of macos to 13.0 2026-08-12 10:46:32 -04:00
050e42cc6f
comp for older macos 2026-08-12 10:34:36 -04:00
67cee201b6
add TODO comment to LinkToMention extension 2026-08-11 20:52:14 -04:00
2d7b067c93
use mobile icon for macOS
this looks better in the macos launcher squircles
2026-08-11 20:39:04 -04:00
a9993013f5
add rooms to mention chips
Needs handling for event links, plus clickability
2026-08-11 20:34:43 -04:00
9c488e8981
only upload .dmgs 2026-08-11 20:08:59 -04:00
5c16f42d20
pin upload-artifact to a commit 2026-08-11 19:58:15 -04:00
092fc616e6
fix paths in macos CI 2026-08-11 19:56:26 -04:00
6cbf78be6b
change step names for macos
[skip ci]
2026-08-11 19:20:08 -04:00
68f4bb0c03
update macos status in readme 2026-08-11 19:18:09 -04:00
9e24f4cb31
add DMG builds 2026-08-11 19:12:56 -04:00
43d2e94d62
make loadOlder properly guard 2026-08-11 10:39:45 -04:00
62fe37c6ae
use mobile icons on iOS 2026-08-11 10:17:24 -04:00
b9dfbd3ca2
update MacOS icons 2026-08-11 10:16:18 -04:00
620440e2a1
Allow logging into homeservers without discovery working 2026-08-10 22:50:13 -04:00
724171384c
change readme wording
[skip ci]
2026-08-08 20:49:23 -04:00
1bd677eb23
add MacOS support to readme 2026-08-08 20:36:48 -04:00
41658c3a9d
change output artifact name for macos ci 2026-08-08 20:33:41 -04:00
b011cc2166
reformat build hook file
[skip ci]
2026-08-08 20:31:09 -04:00
75ad6cbd02
set SDKROOT for macos build 2026-08-08 20:20:02 -04:00
6c1d3d8894
debug macos 2026-08-08 20:08:49 -04:00
842ab0a82c
don't use xcrun clang on macos 2026-08-08 19:57:03 -04:00
a0e5d2fb9e
make macos-related actions not use nix 2026-08-08 19:48:56 -04:00
a2cdc3df68
set CC manually macos 2026-08-08 19:08:20 -04:00
07f8a35b74
bump deps, remove hack for fallback theme that is no longer needed 2026-08-08 19:05:04 -04:00
85b9007c47
bump flake 2026-08-08 18:53:12 -04:00
5bbd51c4bc
fix macos permission issues 2026-08-08 18:52:49 -04:00
21a0e0db70
correctly undo lipo changes 2026-08-08 18:03:57 -04:00
a5f42fe56e
add workaround for lipo issues with Flutter from Nix on MacOS 2026-08-08 17:56:01 -04:00
185c1d2714
undo lipo changes 2026-08-08 17:53:58 -04:00
7eab09585b
Revert "move lipo wrapper"
This reverts commit 56dbd91c96.
2026-08-08 17:51:00 -04:00
c84f0e7e93
dismiss keyboard on scroll of room chat 2026-08-08 17:02:31 -04:00
f7847d587c
only enable autofocus on desktop platforms 2026-08-08 16:57:51 -04:00
56dbd91c96
move lipo wrapper 2026-08-08 16:49:25 -04:00
7bb4d87638 feat: Add iOS platform support (#60)
Co-authored-by: Henry-Hiles <henry@henryhiles.com>
Reviewed-on: Nexus/nexus#60
2026-08-08 16:35:56 -04:00
52 changed files with 455 additions and 347 deletions

View file

@ -1,4 +1,4 @@
name: "Build IPA"
name: "Build iOS App"
on:
push:
@ -16,24 +16,22 @@ jobs:
with:
submodules: recursive
- name: Lix GHA Installer Action
uses: samueldr/lix-gha-installer-action@v2026-02-22
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
extra_nix_config: experimental-features = nix-command flakes flake-self-attrs
flutter-version: 3.44.4
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: gomuks/go.mod
- name: Build app
run: |
nix develop --command bash -c '
set -e
flutter pub get
dart scripts/generate.dart
flutter pub run build_runner build
FLUTTER_ROOT="$(dirname "$(dirname "$(readlink -f "$(command -v flutter)")")")"
sudo find -L "$FLUTTER_ROOT" -type d -iname "*.framework" -exec chmod -R u+w {} +
flutter build ios --release --no-codesign
'
# Unsigned IPA: SideStore/AltStore re-sign this on-device with the
# user's own Apple ID at install time, so no certificate is needed here.

View file

@ -16,27 +16,32 @@ jobs:
with:
submodules: recursive
- name: Lix GHA Installer Action
uses: samueldr/lix-gha-installer-action@v2026-02-22
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
extra_nix_config: experimental-features = nix-command flakes flake-self-attrs
flutter-version: 3.44.4
- name: Build app
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: gomuks/go.mod
- name: Build App
run: |
nix develop --command bash -c '
set -e
flutter pub get
dart scripts/generate.dart
flutter pub run build_runner build
FLUTTER_ROOT="$(dirname "$(dirname "$(readlink -f "$(command -v flutter)")")")"
sudo find -L "$FLUTTER_ROOT" -type d -iname "*.framework" -exec chmod -R u+w {} +
flutter build macos --release
'
- name: Upload installer artifact
- name: Create DMG
id: create-dmg
uses: L-Super/create-dmg-actions@28511e988b13ca34096d439159a66d468b8e724f
with:
dmg_name: nexus
src_dir: build/macos/Build/Products/Release/Nexus.app
- name: Upload DMG
uses: actions/upload-artifact@v6
with:
name: App
path: build/macos/Build/Products/Release/Nexus.app
name: nexus.dmg
path: ${{ steps.create-dmg.outputs.dmg_path }}

3
.gitignore vendored
View file

@ -42,6 +42,3 @@ password.txt
# Nix
/result
# Local IPA builds
*.ipa

View file

@ -15,12 +15,12 @@ A simple and user-friendly Matrix client made with Flutter and a Gomuks backend.
## Progress
- [ ] Platform Support
- [x] Platform Support
- [x] Linux
- [x] Windows
- [x] Windows - Currently has some bugs, due to us not having any developers on Windows. If you want to fix these, get in contact with us though the [Nexus Client Matrix room](https://matrix.to/#/#nexus:federated.nexus).
- [x] Android
- [ ] MacOS ([#50](https://git.federated.nexus/Nexus/nexus/issues/50))
- [ ] iOS
- [x] MacOS - Unsigned .dmg only
- [x] iOS - Unsigned .ipa only
- [ ] Web (may not be possible)
- [x] Login (via OAuth)
- [x] Rooms / Spaces
@ -116,6 +116,9 @@ If you want to try out Nexus, grab one of the following artifacts from CI:
- [Android APK](https://nightly.link/Henry-Hiles/nexus/workflows/android/main/APK.zip)
- [Windows EXE](https://nightly.link/Henry-Hiles/nexus/workflows/windows/main/windows-installer.zip)
- [Unsigned iOS IPA](https://nightly.link/Henry-Hiles/nexus/workflows/ios/main/Nexus.ipa.zip)
- [Unsigned MacOS DMG](https://nightly.link/Henry-Hiles/nexus/workflows/macos/main/nexus.dmg.zip)
- [Windows EXE](https://nightly.link/Henry-Hiles/nexus/workflows/windows/main/windows-installer.zip)
- Flatpak
- [AArch64/Arm64](https://nightly.link/Henry-Hiles/nexus/workflows/flatpak/main/flatpak-aarch64.zip)
- [x86_64/AMD64](https://nightly.link/Henry-Hiles/nexus/workflows/flatpak/main/flatpak-x86_64.zip)
@ -126,8 +129,8 @@ If you want to try out Nexus, grab one of the following artifacts from CI:
#### Linux
- With Nix: Either use direnv and `direnv allow`, or `nix flake develop`
- Without Nix: Install Flutter, Go, Git, Libclang, Libass, MPV, and Glibc. Do not use any Snap packages, they cause various compilation issues.
- On NixOS: Either use direnv and `direnv allow`, or `nix flake develop`
- On other distros: Install Flutter, Go, Git, Libclang, Libass, MPV, and Glibc. Do not use any Snap packages, they cause various compilation issues.
#### Windows

18
flake.lock generated
View file

@ -5,11 +5,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1782949081,
"narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=",
"lastModified": 1785627969,
"narHash": "sha256-4dtXQk/NMePegK/nWp5NSeuZKLATItOq61lpEvmXqGw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
"rev": "427bf4bd9435fdf21321c8cc628c24efc14c0f7a",
"type": "github"
},
"original": {
@ -73,11 +73,11 @@
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1782614948,
"narHash": "sha256-ePjCwr1sNm9NYUqywL7QfK3JnlS015msC+eBu2zKlp8=",
"lastModified": 1785031560,
"narHash": "sha256-OmshNvn2vupOFpYinLUu+1Dnpu4n7Q5N3ggGVNHpkUI=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "db3f255737b94216eb71cce308e2912cf6bc2d7c",
"rev": "0e79af5e3d4dcfcd676ab5ba3f95d2e3352e078c",
"type": "github"
},
"original": {
@ -88,11 +88,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1784497964,
"narHash": "sha256-vlHUuqAcbcH2RKmHbPiuQzbv1pnzzavXnI62RD0bqCU=",
"lastModified": 1785967620,
"narHash": "sha256-IItrdb7Puk05RqOBWZYFC5X6Wl1sJmCfh5MWVHw5iMM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "241313f4e8e508cb9b13278c2b0fa25b9ca27163",
"rev": "b7c2ada94fe99c15b0dbcf4d11fd7850b957a436",
"type": "github"
},
"original": {

View file

@ -29,6 +29,7 @@ Future<void> main(List<String> args) => build(args, (input, output) async {
iosSdk = iosConfig.targetSdk;
final minVersion = iosConfig.targetVersion;
iosSdkPath = await getXCodeTool(sdkType: iosSdk.type);
final archTriple = switch (targetArch) {
Architecture.arm64 => "arm64",
Architecture.x64 => "x86_64",
@ -36,6 +37,7 @@ Future<void> main(List<String> args) => build(args, (input, output) async {
"Unsupported iOS architecture: $targetArch",
),
};
iosTargetTriple = iosSdk == IOSSdk.iPhoneSimulator
? "$archTriple-apple-ios$minVersion.0-simulator"
: "$archTriple-apple-ios$minVersion.0";
@ -48,7 +50,10 @@ Future<void> main(List<String> args) => build(args, (input, output) async {
break;
case OS.macOS:
libFileName = "libgomuks.dylib";
extraEnv = {"SDKROOT": await getXCodeTool()};
extraEnv = {
"SDKROOT": await getXCodeTool(),
"MACOSX_DEPLOYMENT_TARGET": codeConfig.macOS.targetVersion.toString(),
};
break;
case OS.windows:
libFileName = "libgomuks.dll";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 712 B

After

Width:  |  Height:  |  Size: 846 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Before After
Before After

View file

@ -38,6 +38,7 @@ import "package:nexus/models/requests/set_membership.dart";
import "package:nexus/models/requests/set_state.dart";
import "package:nexus/models/requests/upload_media.dart";
import "package:nexus/models/room.dart";
import "package:nexus/models/room_summary.dart";
import "package:nexus/models/spec_versions_response.dart";
import "package:nexus/models/sync_data.dart";
import "package:nexus/src/third_party/gomuks.g.dart";
@ -213,10 +214,11 @@ class ClientController extends AsyncNotifier<int> {
}
}
Future<String> joinRoom(JoinRoomRequest request) async {
final response = await _sendCommand("join_room", request.toJson());
return response["room_id"];
}
Future<String> joinRoom(JoinRoomRequest request) async =>
(await _sendCommand("join_room", request.toJson()))["room_id"];
Future<RoomSummary> getRoomSummary(JoinRoomRequest request) async =>
.fromJson(await _sendCommand("get_room_summary", request.toJson()));
Future<void> leaveRoom(Room room) async {
if (room.metadata == null) return;
@ -311,7 +313,7 @@ class ClientController extends AsyncNotifier<int> {
Future<Uri?> discoverHomeserver(Uri homeserver) async {
try {
final response = await _sendCommand("discover_homeserver", {
"user_id": "@fake-user:${homeserver.host}",
"user_id": "@fake-user:${homeserver.authority}",
});
return Uri.parse(response["m.homeserver"]?["base_url"]);
} catch (error) {

View file

@ -75,12 +75,13 @@ class RoomChatController extends AsyncNotifier<IList<Event>?> {
);
Future<bool> loadOlder() async {
state = AsyncLoading();
final timelineKeys = ref
.read(RoomsController.provider.select((value) => value[roomId]))
?.timeline
.keys;
final response = await ref
.watch(ClientController.provider.notifier)
.read(ClientController.provider.notifier)
.paginate(
.new(
roomId: roomId,
@ -90,8 +91,11 @@ class RoomChatController extends AsyncNotifier<IList<Event>?> {
),
);
if (response.events.isEmpty) {
state = .data(state.value);
} else {
ref
.watch(RoomsController.provider.notifier)
.read(RoomsController.provider.notifier)
.update(
IMap({
roomId: Room(
@ -110,6 +114,7 @@ class RoomChatController extends AsyncNotifier<IList<Event>?> {
}),
.new(),
);
}
return response.hasMore;
}

View file

@ -0,0 +1,18 @@
import "package:hooks_riverpod/hooks_riverpod.dart";
import "package:nexus/controllers/client.dart";
import "package:nexus/models/requests/join_room.dart";
import "package:nexus/models/room_summary.dart";
class RoomSummaryController extends AsyncNotifier<RoomSummary> {
final JoinRoomRequest request;
RoomSummaryController(this.request);
@override
Future<RoomSummary> build() =>
ref.watch(ClientController.provider.notifier).getRoomSummary(request);
static final provider = AsyncNotifierProvider.family
.autoDispose<RoomSummaryController, RoomSummary, JoinRoomRequest>(
RoomSummaryController.new,
);
}

View file

@ -9,14 +9,14 @@ class SettingsController extends AsyncNotifier<Settings> {
final file = await ref.watch(SettingsFileController.provider.future);
try {
return Settings.fromJson(json.decode(await file.readAsString()));
return .fromJson(json.decode(await file.readAsString()));
} catch (_) {
return Settings();
return .new();
}
}
Future<void> set(Settings settings) async {
state = AsyncData(settings);
state = .data(settings);
final file = await ref.watch(SettingsFileController.provider.future);
await file.writeAsString(json.encode(settings.toJson()));
}

View file

@ -9,6 +9,7 @@ extension LinkToMention on String {
///
/// Returns the decoded identifier (e.g. "#room:matrix.org")
/// or null if this is not a Matrix link.
/// TODO: Needs to be reworked to handle event links. Might be worth just rewriting, I don't like this code.
String? get mention {
final trimmed = trim();

View file

@ -112,7 +112,7 @@ class App extends StatelessWidget {
data: (settings) =>
settings.useDynamicTheming ? lightDynamic : null,
) ??
ColorScheme.fromSeed(seedColor: Colors.indigo))
ThemeData.light().colorScheme)
.theme,
darkTheme:
(ref
@ -122,10 +122,7 @@ class App extends StatelessWidget {
data: (settings) =>
settings.useDynamicTheming ? darkDynamic : null,
) ??
ColorScheme.fromSeed(
seedColor: Colors.indigo,
brightness: Brightness.dark,
))
ThemeData.dark().colorScheme)
.theme,
themeMode: ref
.watch(SettingsController.provider)

View file

@ -7,7 +7,7 @@ part "join_room.g.dart";
abstract class JoinRoomRequest with _$JoinRoomRequest {
const factory JoinRoomRequest({
required String roomIdOrAlias,
required IList<String> via,
@Default(IList.empty()) IList<String> via,
}) = _JoinRoomRequest;
factory JoinRoomRequest.fromJson(Map<String, Object?> json) =>

View file

@ -0,0 +1,23 @@
import "package:freezed_annotation/freezed_annotation.dart";
import "package:nexus/models/content/create.dart";
import "package:nexus/models/join_rule.dart";
part "room_summary.freezed.dart";
part "room_summary.g.dart";
@freezed
abstract class RoomSummary with _$RoomSummary {
const factory RoomSummary({
required String roomId,
@JsonKey(name: "num_joined_members") required int joinedMembers,
JoinRule? joinRule,
String? name,
Uri? avatarUrl,
String? canonicalAlias,
String? topic,
String? roomVersion,
@JsonKey(unknownEnumValue: RoomType.room) RoomType? roomType,
}) = _RoomSummary;
factory RoomSummary.fromJson(Map<String, Object?> json) =>
_$RoomSummaryFromJson(json);
}

View file

@ -26,6 +26,17 @@ class SelectServerPage extends HookConsumerWidget {
final homeserverUrl = useTextEditingController();
Future<void> setHomeserver(Uri? newHomeserver) async {
if (newHomeserver == null) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
"Failed to parse homeserver URL. Are you sure you typed it correctly?",
style: .new(color: theme.colorScheme.onErrorContainer),
),
backgroundColor: theme.colorScheme.errorContainer,
),
);
}
isLoading.value = true;
try {
@ -33,26 +44,14 @@ class SelectServerPage extends HookConsumerWidget {
newHomeserver = Uri.https(newHomeserver!.path);
}
final newUrl = newHomeserver == null
? null
: await ref
final newUrl = await ref
.read(ClientController.provider.notifier)
.discoverHomeserver(newHomeserver);
.discoverHomeserver(newHomeserver!);
if (context.mounted) {
if (newUrl == null) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
"Homeserver verification failed. Is your homeserver down?",
style: .new(color: theme.colorScheme.onErrorContainer),
),
backgroundColor: theme.colorScheme.errorContainer,
),
);
} else {
Future<void> tryLogin(Uri url) async {
final codeResponse = await ref.watch(
AuthUrlController.provider(newUrl).future,
AuthUrlController.provider(url).future,
);
await ref.watch(LaunchHelper.provider).launchUrl(codeResponse.url);
@ -70,7 +69,7 @@ class SelectServerPage extends HookConsumerWidget {
.watch(ClientController.provider.notifier)
.exchangeToken(
.new(
homeserverUrl: newUrl,
homeserverUrl: url,
codeVerifier: codeResponse.codeVerifier,
redirectUri: .new(
scheme: "nexus.federated.nexus",
@ -78,7 +77,7 @@ class SelectServerPage extends HookConsumerWidget {
),
code: code,
clientId: await ref.watch(
ClientIdController.provider(newUrl).future,
ClientIdController.provider(url).future,
),
),
)
@ -89,6 +88,25 @@ class SelectServerPage extends HookConsumerWidget {
}
});
}
if (newUrl == null) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
"Homeserver verification failed.",
style: .new(color: theme.colorScheme.onErrorContainer),
),
action: SnackBarAction(
onPressed: () => tryLogin(newHomeserver!),
label: "Attempt log in anyways",
textColor: theme.colorScheme.onErrorContainer,
),
backgroundColor: theme.colorScheme.errorContainer,
),
);
} else {
tryLogin(newUrl);
}
}
} catch (error, stackTrace) {
showError(error, stackTrace);

View file

@ -235,9 +235,11 @@ class Composer extends HookConsumerWidget {
maxLines: 12,
minLines: 1,
autofocus:
Platform.isLinux ||
(Platform.isLinux ||
Platform.isMacOS ||
Platform.isWindows,
Platform.isWindows)
? true
: false,
decoration: .new(
hintText: "Your message here...",
border: .none,

View file

@ -1,8 +1,11 @@
import "package:flutter/material.dart";
import "package:flutter_riverpod/flutter_riverpod.dart";
import "package:nexus/controllers/room_summary.dart";
import "package:nexus/controllers/user.dart";
import "package:nexus/helpers/extensions/link_to_mention.dart";
import "package:nexus/helpers/extensions/show_user_popover.dart";
import "package:nexus/models/content/membership.dart";
import "package:nexus/models/room_summary.dart";
class MentionChip extends ConsumerWidget {
final String? roomId;
@ -12,29 +15,48 @@ class MentionChip extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final mention = content.mention;
final membership = mention?.startsWith("@") == true
? ref
final data = switch (mention?.characters.firstOrNull) {
"@" =>
ref
.watch(
UserController.provider(.new(roomId: roomId, userId: mention!)),
)
.whenOrNull(data: (data) => data)
: null;
.whenOrNull(data: (data) => data),
"#" || "!" =>
ref
.watch(
RoomSummaryController.provider(.new(roomIdOrAlias: mention!)),
)
.whenOrNull(data: (data) => data),
_ => null,
};
return mention == null
? SizedBox.shrink()
: InkWell(
onTap: () {
if (membership != null) {
if (data case MembershipContent membership) {
context.showUserPopover(membership, mention, roomId: roomId);
} else if (data case RoomSummary summary) {
// TODO: Handle summary
}
},
child: IgnorePointer(
child: Chip(
label: Text(
(membership?.displayName == null
? null
: "@${membership!.displayName}") ??
mention,
switch (data) {
RoomSummary summary =>
(summary.name == null ? null : "#${summary.name}") ??
summary.canonicalAlias ??
summary.roomId,
MembershipContent membership =>
membership.displayName == null
? mention
: "@${membership.displayName}",
_ => mention,
},
style: .new(
fontWeight: .bold,
color: Theme.of(context).colorScheme.onPrimary,

View file

@ -80,6 +80,7 @@ class RoomChat extends HookConsumerWidget {
final controllerData = ref.watch(controllerProvider);
final topEventBeforeLoad = useState<String?>(null);
final hasMore = useState<bool>(true);
Future<void> jumpToId(String eventId) async {
final index = controllerData.value?.indexWhere(
@ -105,7 +106,7 @@ class RoomChat extends HookConsumerWidget {
Future<void> loadOlder() async {
if (controllerData case AsyncData(:final value?)) {
topEventBeforeLoad.value = value.firstOrNull?.eventId;
await notifier.loadOlder();
hasMore.value = await notifier.loadOlder();
}
}
@ -310,7 +311,7 @@ class RoomChat extends HookConsumerWidget {
await Clipboard.setData(
ClipboardData(
text:
"matrix:roomid/${room.metadata?.id.substring(1)}/e/${event.eventId}$vias)",
"matrix:roomid/${room.metadata?.id.substring(1)}/e/${event.eventId}$vias",
),
);
},
@ -466,10 +467,11 @@ class RoomChat extends HookConsumerWidget {
child: switch (controllerData) {
AsyncData(:final value?) ||
AsyncLoading(:final value?) => CustomScrollView(
controller: scrollController,
keyboardDismissBehavior:
ScrollViewKeyboardDismissBehavior.onDrag,
controller: scrollController,
slivers: [
if (hasMore.value)
SliverToBoxAdapter(
child: Padding(
padding: .symmetric(vertical: 36),

View file

@ -35,8 +35,7 @@ class RoomMenu extends ConsumerWidget {
await Clipboard.setData(
.new(
text:
"matrix:roomid/${room!.metadata?.id.substring(1)}$vias)",
text: "matrix:roomid/${room!.metadata?.id.substring(1)}$vias",
),
);
},

View file

@ -1,4 +1,4 @@
platform :osx, '10.15'
platform :osx, '13.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

View file

@ -567,7 +567,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
@ -649,7 +649,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
@ -699,7 +699,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MACOSX_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;

View file

@ -1,4 +1,8 @@
{
"info": {
"version": 1,
"author": "xcode"
},
"images": [
{
"size": "16x16",
@ -60,9 +64,5 @@
"filename": "app_icon_1024.png",
"scale": "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 B

After

Width:  |  Height:  |  Size: 678 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Before After
Before After

View file

@ -293,10 +293,10 @@ packages:
dependency: "direct main"
description:
name: dynamic_color
sha256: "43a5a6679649a7731ab860334a5812f2067c2d9ce6452cf069c5e0c25336c17c"
sha256: "4aeb76de323e8eb660bab5557d826ad7ebbf1434a598f0c6aa8a11a9696a6757"
url: "https://pub.dev"
source: hosted
version: "1.8.1"
version: "1.9.0"
dynamic_polls:
dependency: "direct main"
description:
@ -366,10 +366,10 @@ packages:
dependency: "direct main"
description:
name: ffigen
sha256: b7803707faeec4ce3c1b0c2274906504b796e3b70ad573577e72333bd1c9b3ba
sha256: "56fc0be88937409839a59c133dfdee4165e80da324c9e39f59013060249ffb44"
url: "https://pub.dev"
source: hosted
version: "20.1.1"
version: "21.0.0"
file:
dependency: transitive
description:
@ -762,10 +762,10 @@ packages:
dependency: "direct dev"
description:
name: json_serializable
sha256: ffcd10cde35a93b2abbbcc26bd9971f4ca93763e8abe78d855e3c4177797e501
sha256: e45aefa0324f08c683caafbb94b72837aa6193c61822799c916e45f4a263113d
url: "https://pub.dev"
source: hosted
version: "6.14.0"
version: "6.14.1"
leak_tracker:
dependency: transitive
description:
@ -819,10 +819,10 @@ packages:
dependency: "direct main"
description:
name: m3e_buttons
sha256: af1b19bd5ec7327d20b5a57c6c91e1ed30ee15a4dbade781c0cdbc72e6b04b5e
sha256: "20b29df165d4d866ffd0d4808090210740690707705f44fc61c9b275bec3af36"
url: "https://pub.dev"
source: hosted
version: "0.0.4"
version: "0.0.5"
m3e_card_list:
dependency: "direct main"
description:
@ -951,6 +951,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.0"
native_toolchain_c:
dependency: transitive
description:
name: native_toolchain_c
sha256: f9c168717100ae6d9fee9ffb0be379bf1f8b26b0f6bcbd4fdddcd931993a6a72
url: "https://pub.dev"
source: hosted
version: "0.19.2"
navigation_rail_m3e:
dependency: "direct main"
description:

View file

@ -39,7 +39,7 @@ dependencies:
freezed_annotation: 3.1.0
image_picker: ^1.2.3
path: 1.9.1
dynamic_color: 1.8.1
dynamic_color: 1.9.0
collection: 1.19.1
window_manager: 0.5.2
color_hash: 1.0.1
@ -53,7 +53,7 @@ dependencies:
ffi: 2.2.0
hooks: 2.0.2
code_assets: 1.2.1
ffigen: 20.1.1
ffigen: 21.0.0
timeago: 3.7.1
http: 1.6.0
flutter_linkify: 6.0.0
@ -67,7 +67,7 @@ dependencies:
media_kit_video: 2.0.1
media_kit_libs_video: 1.0.7
measure_size: 5.0.2
m3e_buttons: 0.0.4
m3e_buttons: 0.0.5
navigation_rail_m3e:
git:
url: https://github.com/Henry-Hiles/material_3_expressive
@ -84,15 +84,18 @@ dev_dependencies:
freezed: 3.2.6-dev.1
riverpod_lint: 3.1.4
flutter_launcher_icons: 0.14.4
json_serializable: 6.14.0
json_serializable: 6.14.1
flutter_launcher_icons:
ios: true
android: true
image_path: assets/icon.png
ios: true
image_path_ios: assets/mobile.png
android: true
adaptive_icon_background: assets/background.png
adaptive_icon_foreground: assets/foreground.png
adaptive_icon_monochrome: assets/monochrome.png
remove_alpha_ios: true
windows:
generate: true
macos:
generate: true
image_path: assets/mobile.png