forked from Nexus/nexus
Compare commits
4 commits
ab40600746
...
632c02a517
| Author | SHA1 | Date | |
|---|---|---|---|
|
632c02a517 |
|||
|
355c564123 |
|||
|
1af957d4a1 |
|||
|
1986e2a627 |
5 changed files with 13 additions and 11 deletions
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
|
|
@ -36,7 +36,7 @@ jobs:
|
||||||
- name: Go build
|
- name: Go build
|
||||||
run: |
|
run: |
|
||||||
cd gomuks/pkg/ffi
|
cd gomuks/pkg/ffi
|
||||||
go build -tags goolm -o ../../../libgomuks.dll -buildmode=c-shared
|
go build -tags goolm,sqlite_fts5 -o ../../../libgomuks.dll -buildmode=c-shared
|
||||||
|
|
||||||
- name: Build with Flutter
|
- name: Build with Flutter
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
2
gomuks
2
gomuks
|
|
@ -1 +1 @@
|
||||||
Subproject commit da3b823e1435afd6f2a1ea6c354d9a35c489b624
|
Subproject commit 819f5d69f068ddedb08fe732f50570e33dd19e0f
|
||||||
|
|
@ -55,7 +55,11 @@ Future<void> main(List<String> args) => build(args, (input, output) async {
|
||||||
libFile = buildDir.resolve("${targetArch.name}/$libFileName");
|
libFile = buildDir.resolve("${targetArch.name}/$libFileName");
|
||||||
|
|
||||||
// goheif/dav1d supported on Android would need to fix upstream
|
// goheif/dav1d supported on Android would need to fix upstream
|
||||||
final tags = targetOS == OS.android ? "goolm,noheic" : "goolm";
|
final tags = [
|
||||||
|
"sqlite_fts5",
|
||||||
|
"goolm",
|
||||||
|
if (targetOS == OS.android) "noheic",
|
||||||
|
].join(",");
|
||||||
print(
|
print(
|
||||||
"Building Gomuks shared library $libFileName (${targetOS.name}/${targetArch.name}) to ${libFile.path}...",
|
"Building Gomuks shared library $libFileName (${targetOS.name}/${targetArch.name}) to ${libFile.path}...",
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -39,13 +39,11 @@ class PowerLevelController extends Notifier<bool> {
|
||||||
);
|
);
|
||||||
if (user == null || content is! PowerLevelsContent) return false;
|
if (user == null || content is! PowerLevelsContent) return false;
|
||||||
|
|
||||||
int powerLevelOf(String userId) =>
|
double powerLevelOf(String userId) => roomCreators?.contains(userId) == true
|
||||||
content.users[userId] ?? content.usersDefault;
|
|
||||||
|
|
||||||
// room creators get power level infinite
|
|
||||||
final userLevel = roomCreators?.contains(user) == true
|
|
||||||
? double.infinity
|
? double.infinity
|
||||||
: powerLevelOf(user);
|
: (content.users[userId] ?? content.usersDefault).toDouble();
|
||||||
|
|
||||||
|
final userLevel = powerLevelOf(user);
|
||||||
|
|
||||||
return switch (config) {
|
return switch (config) {
|
||||||
EventPowerLevelConfig(:final eventType) =>
|
EventPowerLevelConfig(:final eventType) =>
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,12 @@ buildGoModule (finalAttrs: {
|
||||||
|
|
||||||
src = "${src}/gomuks";
|
src = "${src}/gomuks";
|
||||||
|
|
||||||
vendorHash = "sha256-EeGuh73jcK2aKmEJsMaAqQRJMzzHj3s8LrLb/QmorbQ=";
|
vendorHash = "sha256-/Wvx5WjnlPpQILpNqo9075F3nox0Dm8PfqGgck4CifQ=";
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
go build -buildmode=c-shared -o libgomuks.so -tags goolm,noheic ./pkg/ffi
|
go build -buildmode=c-shared -o libgomuks.so -tags goolm,noheic,sqlite_fts5 ./pkg/ffi
|
||||||
|
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue