diff --git a/LIBCWTCH-GO.version b/LIBCWTCH-GO.version index e715548d..271b7350 100644 --- a/LIBCWTCH-GO.version +++ b/LIBCWTCH-GO.version @@ -1 +1 @@ -v1.0.0-5-g2bf1adb-2021-06-25-05-26 \ No newline at end of file +v1.0.0-7-g520d35a-2021-06-25-16-34 \ No newline at end of file diff --git a/README.md b/README.md index 34241d44..0be515c7 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,39 @@ # Cwtch UI -A Flutter based Cwtch UI +A Flutter based [Cwtch](https://cwtch.im) UI. + +This README covers build instructions, for information on Cwtch itself please go to [https://cwtch.im](https://cwtch.im) ## Getting Started -click the play button in android studio +First you will need a valid [flutter sdk installation](https://flutter.dev/docs/get-started/install) +and run `flutter pub get` to fetch dependencies. -### Linux +You will probably want to disable Analytics on the Flutter Tool: `flutter config --no-analytics` -- libCwtch-go: required to be on the link path (linux/cwtch.destktop demonstrates with `env LD_LIBRARY_PATH=./lib/` on the front of the comman) - - fetch-libcwtch-go.sh will fetch a prebuilt version - - or compile from source from libcwtch-go with `make linux` -- `tor` should be in the PATH +### Building on Linux (for Linux) -### Windows +- run `fetch-libcwtch-go.sh`libCwtch-go to fetch a prebuild version of `libCwtch-go.so` go to `./linux`. Include `./linux` in `LD_LIBRARY_PATH` +- run `fetch-tor.sh` and/or ensure that `tor` is in `$PATH` +- run `flutter run -d linux` -- run `fetch-libcwtch-go.ps1` to get `libCwtch.dll` which is required to run +### Building on Windows (for Windows) + +- run `fetch-libcwtch-go.ps1` to fetch a prebuild version of `libCwtch.dll` - run `fetch-tor-win.ps1` to fetch Tor for windows +- run `flutter run -d windows` -#### Issues +### Building on Linux/Windows (for Android) -- Flutter engine has a [known bug](https://github.com/flutter/flutter/issues/75675) around the Right Shift key being sticky. We have implemented the mostly work around, but until it is fixed, right shift occasionally acts permenent. If this happens, just tap left shift and it will reset +- Follow the steps above to fetch `libCwtch-go` and `tor` (these will fetch Android versions of these binaries also) +- run `flutter run` with an Android phone connect via USB (or some other valid debug mode) -## l10n +#### Known Platform Issues + +- **Windows**: Flutter engine has a [known bug](https://github.com/flutter/flutter/issues/75675) around the Right Shift key being sticky. +We have implemented a partial workaround, if this happens, tap left shift and it will reset. + +## l10n Instructions ### Adding a new string diff --git a/lib/cwtch/cwtchNotifier.dart b/lib/cwtch/cwtchNotifier.dart index a6e15b91..d5597674 100644 --- a/lib/cwtch/cwtchNotifier.dart +++ b/lib/cwtch/cwtchNotifier.dart @@ -131,6 +131,7 @@ class CwtchNotifier { } profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["GroupID"])!.totalMessages++; profileCN.getProfile(data["ProfileOnion"])?.contactList.updateLastMessageTime(data["GroupID"], DateTime.now()); + notificationManager.notify("New Message From Group!"); } else { // from me (already displayed - do not update counter) var idx = data["Signature"]; diff --git a/lib/l10n/intl_de.arb b/lib/l10n/intl_de.arb index fed23360..c4485c95 100644 --- a/lib/l10n/intl_de.arb +++ b/lib/l10n/intl_de.arb @@ -1,6 +1,8 @@ { "@@locale": "de", - "@@last_modified": "2021-06-24T23:32:06+02:00", + "@@last_modified": "2021-06-25T18:57:59+02:00", + "notificationNewMessageFromGroup": "New message in a group!", + "notificationNewMessageFromPeer": "New message from a contact!", "tooltipHidePassword": "Hide Password", "tooltipShowPassword": "Show Password", "serverNotSynced": "Syncing New Messages (This can take some time)...", diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 9c5a22a7..123a9eb8 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -1,6 +1,8 @@ { "@@locale": "en", - "@@last_modified": "2021-06-24T23:32:06+02:00", + "@@last_modified": "2021-06-25T18:57:59+02:00", + "notificationNewMessageFromGroup": "New message in a group!", + "notificationNewMessageFromPeer": "New message from a contact!", "tooltipHidePassword": "Hide Password", "tooltipShowPassword": "Show Password", "serverNotSynced": "Syncing New Messages (This can take some time)...", diff --git a/lib/l10n/intl_es.arb b/lib/l10n/intl_es.arb index 0d42ec45..9a4b88de 100644 --- a/lib/l10n/intl_es.arb +++ b/lib/l10n/intl_es.arb @@ -1,6 +1,8 @@ { "@@locale": "es", - "@@last_modified": "2021-06-24T23:32:06+02:00", + "@@last_modified": "2021-06-25T18:57:59+02:00", + "notificationNewMessageFromGroup": "New message in a group!", + "notificationNewMessageFromPeer": "New message from a contact!", "tooltipHidePassword": "Hide Password", "tooltipShowPassword": "Show Password", "serverNotSynced": "Fuera de sincronización con el servidor", diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index cd9c93fc..5af33cab 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -1,6 +1,8 @@ { "@@locale": "fr", - "@@last_modified": "2021-06-24T23:32:06+02:00", + "@@last_modified": "2021-06-25T18:57:59+02:00", + "notificationNewMessageFromGroup": "New message in a group!", + "notificationNewMessageFromPeer": "New message from a contact!", "tooltipHidePassword": "Hide Password", "tooltipShowPassword": "Show Password", "serverNotSynced": "Syncing New Messages (This can take some time)...", diff --git a/lib/l10n/intl_it.arb b/lib/l10n/intl_it.arb index a66d8434..32ad2726 100644 --- a/lib/l10n/intl_it.arb +++ b/lib/l10n/intl_it.arb @@ -1,6 +1,8 @@ { "@@locale": "it", - "@@last_modified": "2021-06-24T23:32:06+02:00", + "@@last_modified": "2021-06-25T18:57:59+02:00", + "notificationNewMessageFromGroup": "New message in a group!", + "notificationNewMessageFromPeer": "New message from a contact!", "tooltipHidePassword": "Hide Password", "tooltipShowPassword": "Show Password", "serverNotSynced": "Non sincronizzato", diff --git a/lib/l10n/intl_pt.arb b/lib/l10n/intl_pt.arb index e94df9f4..0b2b4593 100644 --- a/lib/l10n/intl_pt.arb +++ b/lib/l10n/intl_pt.arb @@ -1,6 +1,8 @@ { "@@locale": "pt", - "@@last_modified": "2021-06-24T23:32:06+02:00", + "@@last_modified": "2021-06-25T18:57:59+02:00", + "notificationNewMessageFromGroup": "New message in a group!", + "notificationNewMessageFromPeer": "New message from a contact!", "tooltipHidePassword": "Hide Password", "tooltipShowPassword": "Show Password", "serverNotSynced": "Syncing New Messages (This can take some time)...", diff --git a/lib/notification_manager.dart b/lib/notification_manager.dart index d6c69253..2f6701ad 100644 --- a/lib/notification_manager.dart +++ b/lib/notification_manager.dart @@ -20,6 +20,6 @@ class LinuxNotificationsManager implements NotificationsManager { LinuxNotificationsManager() {} Future notify(String message) async { var icon_path = Uri.file(path.join(path.current, "cwtch.png")); - client.notify('New Message from Peer!', appName: "cwtch", appIcon: icon_path.toString(), replacesId: this.previous_id).then((Notification value) => previous_id = value.id); + client.notify(message, appName: "cwtch", appIcon: icon_path.toString(), replacesId: this.previous_id).then((Notification value) => previous_id = value.id); } }