Merge pull request 'Stub Notifications for Group Messages Linux' (#6) from notifications into trunk
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Reviewed-on: #6
This commit is contained in:
commit
7c369fc7e0
|
@ -1 +1 @@
|
||||||
v1.0.0-5-g2bf1adb-2021-06-25-05-26
|
v1.0.0-7-g520d35a-2021-06-25-16-34
|
35
README.md
35
README.md
|
@ -1,28 +1,39 @@
|
||||||
# Cwtch UI
|
# 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
|
## 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)
|
### Building on Linux (for Linux)
|
||||||
- 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
|
|
||||||
|
|
||||||
### 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 `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
|
### Adding a new string
|
||||||
|
|
||||||
|
|
|
@ -131,6 +131,7 @@ class CwtchNotifier {
|
||||||
}
|
}
|
||||||
profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["GroupID"])!.totalMessages++;
|
profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["GroupID"])!.totalMessages++;
|
||||||
profileCN.getProfile(data["ProfileOnion"])?.contactList.updateLastMessageTime(data["GroupID"], DateTime.now());
|
profileCN.getProfile(data["ProfileOnion"])?.contactList.updateLastMessageTime(data["GroupID"], DateTime.now());
|
||||||
|
notificationManager.notify("New Message From Group!");
|
||||||
} else {
|
} else {
|
||||||
// from me (already displayed - do not update counter)
|
// from me (already displayed - do not update counter)
|
||||||
var idx = data["Signature"];
|
var idx = data["Signature"];
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "de",
|
"@@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",
|
"tooltipHidePassword": "Hide Password",
|
||||||
"tooltipShowPassword": "Show Password",
|
"tooltipShowPassword": "Show Password",
|
||||||
"serverNotSynced": "Syncing New Messages (This can take some time)...",
|
"serverNotSynced": "Syncing New Messages (This can take some time)...",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "en",
|
"@@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",
|
"tooltipHidePassword": "Hide Password",
|
||||||
"tooltipShowPassword": "Show Password",
|
"tooltipShowPassword": "Show Password",
|
||||||
"serverNotSynced": "Syncing New Messages (This can take some time)...",
|
"serverNotSynced": "Syncing New Messages (This can take some time)...",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "es",
|
"@@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",
|
"tooltipHidePassword": "Hide Password",
|
||||||
"tooltipShowPassword": "Show Password",
|
"tooltipShowPassword": "Show Password",
|
||||||
"serverNotSynced": "Fuera de sincronización con el servidor",
|
"serverNotSynced": "Fuera de sincronización con el servidor",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "fr",
|
"@@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",
|
"tooltipHidePassword": "Hide Password",
|
||||||
"tooltipShowPassword": "Show Password",
|
"tooltipShowPassword": "Show Password",
|
||||||
"serverNotSynced": "Syncing New Messages (This can take some time)...",
|
"serverNotSynced": "Syncing New Messages (This can take some time)...",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "it",
|
"@@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",
|
"tooltipHidePassword": "Hide Password",
|
||||||
"tooltipShowPassword": "Show Password",
|
"tooltipShowPassword": "Show Password",
|
||||||
"serverNotSynced": "Non sincronizzato",
|
"serverNotSynced": "Non sincronizzato",
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
"@@locale": "pt",
|
"@@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",
|
"tooltipHidePassword": "Hide Password",
|
||||||
"tooltipShowPassword": "Show Password",
|
"tooltipShowPassword": "Show Password",
|
||||||
"serverNotSynced": "Syncing New Messages (This can take some time)...",
|
"serverNotSynced": "Syncing New Messages (This can take some time)...",
|
||||||
|
|
|
@ -20,6 +20,6 @@ class LinuxNotificationsManager implements NotificationsManager {
|
||||||
LinuxNotificationsManager() {}
|
LinuxNotificationsManager() {}
|
||||||
Future<void> notify(String message) async {
|
Future<void> notify(String message) async {
|
||||||
var icon_path = Uri.file(path.join(path.current, "cwtch.png"));
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue