1
0
Fork 0
forked from Nexus/nexus

Compare commits

..

No commits in common. "632c02a51713de0c53c1ec7ea658c692cb617123" and "ab40600746945db7f7bd8e92eaffa19f3ee166f9" have entirely different histories.

5 changed files with 11 additions and 13 deletions

View file

@ -36,7 +36,7 @@ jobs:
- name: Go build
run: |
cd gomuks/pkg/ffi
go build -tags goolm,sqlite_fts5 -o ../../../libgomuks.dll -buildmode=c-shared
go build -tags goolm -o ../../../libgomuks.dll -buildmode=c-shared
- name: Build with Flutter
run: |

2
gomuks

@ -1 +1 @@
Subproject commit 819f5d69f068ddedb08fe732f50570e33dd19e0f
Subproject commit da3b823e1435afd6f2a1ea6c354d9a35c489b624

View file

@ -55,11 +55,7 @@ Future<void> main(List<String> args) => build(args, (input, output) async {
libFile = buildDir.resolve("${targetArch.name}/$libFileName");
// goheif/dav1d supported on Android would need to fix upstream
final tags = [
"sqlite_fts5",
"goolm",
if (targetOS == OS.android) "noheic",
].join(",");
final tags = targetOS == OS.android ? "goolm,noheic" : "goolm";
print(
"Building Gomuks shared library $libFileName (${targetOS.name}/${targetArch.name}) to ${libFile.path}...",
);

View file

@ -39,11 +39,13 @@ class PowerLevelController extends Notifier<bool> {
);
if (user == null || content is! PowerLevelsContent) return false;
double powerLevelOf(String userId) => roomCreators?.contains(userId) == true
? double.infinity
: (content.users[userId] ?? content.usersDefault).toDouble();
int powerLevelOf(String userId) =>
content.users[userId] ?? content.usersDefault;
final userLevel = powerLevelOf(user);
// room creators get power level infinite
final userLevel = roomCreators?.contains(user) == true
? double.infinity
: powerLevelOf(user);
return switch (config) {
EventPowerLevelConfig(:final eventType) =>

View file

@ -11,12 +11,12 @@ buildGoModule (finalAttrs: {
src = "${src}/gomuks";
vendorHash = "sha256-/Wvx5WjnlPpQILpNqo9075F3nox0Dm8PfqGgck4CifQ=";
vendorHash = "sha256-EeGuh73jcK2aKmEJsMaAqQRJMzzHj3s8LrLb/QmorbQ=";
buildPhase = ''
runHook preBuild
go build -buildmode=c-shared -o libgomuks.so -tags goolm,noheic,sqlite_fts5 ./pkg/ffi
go build -buildmode=c-shared -o libgomuks.so -tags goolm,noheic ./pkg/ffi
runHook postBuild
'';