Commit graph

94 commits

Author SHA1 Message Date
Albert Vaca Cintora
2ca09a5ec1 Added a todo 2019-07-20 13:54:23 +02:00
Aleix Pol
9597017bf3 Fix running kdeconnect-sms on gnome 2019-07-20 13:46:19 +02:00
Simon Redman
edee0e0e9d [SMS App] Handle addresses for multitarget messages
## Summary

Upgrade the SMS App to handle multitarget addresses in the "addresses" field of a message and drop usage of the "address" field

Also note that this has all the commits from https://invent.kde.org/kde/kdeconnect-kde/merge_requests/97, but I will rebase those away once that patch is landed

Bonus: Image composition for multitarget conversations

## Test Plan
- Apply Android-side patch https://invent.kde.org/kde/kdeconnect-android/merge_requests/80
- Launch SMS App
- Notice that you can see all the recipients of multitarget messages. (Replying still not supported, but might get implemented as part of fixing replying to single-target messages)
2019-07-19 17:33:15 +00:00
Simon Redman
ee9547ed89 [SMS App] Basic plain-text MMS support
## Summary

Desktop companion to https://invent.kde.org/kde/kdeconnect-android/merge_requests/78

Give desktop SMS app a basic understanding of the MMSes coming from Android:
- Show a fake body if we get an attachment we can't display (for now, any attachment)
- Display a fake contact header for multi-target messages since Android does not yet export multi-target address information
- Disable attempting to reply to multi-target messages

BUG: 398889

## Test Plan
### Before:
MMS messages were silently dropped, meaning:
 - Group MMS conversations were not visible
 - Single-target conversations with the most-recent message an MMS were not visible

### After:
 - Install https://invent.kde.org/kde/kdeconnect-android/merge_requests/78
 - Multi-target conversations are displayed (kind of ugly, since they have no contact information
 - Single-target conversations which end with an MMS are displayed
 - Plain-text MMS is displayed nicely
 - MMS attachments don't show
   - MMS which are only an attachment with no body are displayed with a dummy body
2019-07-19 15:29:28 +00:00
l10n daemon script
3d0acf15a5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-06-27 05:13:07 +02:00
Nicolas Fella
e601755644 Force usage of QStringLiteral and port remaining offenders 2019-06-10 14:40:28 +00:00
Simon Redman
3c346b9409 Block matching empty phone numbers 2019-06-07 16:39:18 -06:00
Simon Redman
b4da91f86b Really actually fix Windows SMS app build 2019-06-02 15:47:14 -06:00
Simon Redman
79325254b7 Fix Windows SMS app build 2019-06-02 15:27:46 -06:00
Nicolas Fella
4f4b105adf Revert "use override"
Whatever the problem was, this is not a fix

This reverts commit c99678915e.
2019-06-02 22:10:21 +02:00
Piyush Aggarwal
c99678915e use override 2019-06-02 19:54:31 +00:00
Simon Redman
e8a2e81421 Move SMS App helper functions to their own file 2019-06-02 14:52:54 +00:00
Simon Redman
9447d7e5de Rearrange ConversationListModel to not set deviceID when it has been determined to be invalid 2019-06-01 10:44:41 -06:00
Simon Redman
05826cc650 Allow all-zero phone number 2019-05-30 18:48:14 -06:00
Simon Redman
a5a0c16b61 Match contacts with many phone numbers
Also adds testing for some back-end of the SMS app
2019-05-30 19:18:32 +00:00
l10n daemon script
ee1a535cc2 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-05-08 05:42:59 +02:00
Simon Redman
db611fae67 Revert "Remove unneeded src"
This reverts commit 4c8c2b3d8f
2019-05-05 16:32:14 +00:00
Nicolas Fella
4c8c2b3d8f Remove unneeded src 2019-04-30 19:09:26 +02:00
Nicolas Fella
278eed89d6 Fix build 2019-04-30 19:07:32 +02:00
Simon Redman
459a1992e5 Check empty string using .isEmpty() instead of == "" 2019-04-30 10:11:57 -06:00
Nicolas Fella
3b8fedea1a Replace http GNU urls with https 2019-03-23 17:29:26 +01:00
Simon Redman
a922ca570d Use Shift+Enter instead of Ctrl+Enter to add newline to in-progress SMS message 2019-03-18 16:13:54 -06:00
Simon Redman
037543e42b [SMS App] Improve "No devices available" warning
Summary:
Make "No devices available" warning more obvious, add explaination

New warning:
{F6479206}

With mouseover explanation:
{F6479207}

Test Plan:
 - Open app with remote device connected, everything behaves as normal
 - Disconnect remote device, observe warning at top of dialogue
 - Mouse over warning, be told what the situation means for your use of the app
  - Note that, due to [[https://bugs.kde.org/show_bug.cgi?id=401587|bug 401587]], it is not actually possible to view cached content. That will be fixed eventually.

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: apol, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17616
2019-03-18 15:59:54 -06:00
Simon Redman
5cac399273 Fix bug causing smsapp's '--message' argument to not pass data through 2019-03-18 15:56:01 -06:00
Simon Redman
0bf02481a6 Properly disable new message-entry area when device is disconnected 2019-03-09 17:16:43 -07:00
Nicolas Fella
906cdfba64 Use input field from Kaidan
Summary: It looks a bit better

Test Plan: {F6314845}

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, sredman, mart, hein, apol, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16071
2019-03-10 00:36:18 +01:00
Nicolas Fella
fd99d84ead [SMS App] Allow passing a message via args
Summary:
Add --message option to kdeconnect-sms to pass a message. The user only needs to choose a recepient and the message will be sent. Useful for integration with 3rd party
apps, e.g. via Purpose

Test Plan:
kdeconnect-sms --message "Hello World", choose chat, message is sent
Click another chat, no message sent
kdeconnect-sms without args, no message sent

Reviewers: #kde_connect, sredman

Reviewed By: #kde_connect, sredman

Subscribers: andyholmes, sredman, apol, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17292
2019-03-09 22:44:28 +01:00
Simon Redman
8742dc5797 Fix doubly-nested ConversationDisplay which was causing messages to not be send-able
Bug introduced by commit 1ec20886a8

Something in my build system changed so I was testing the wrong build when merging before!
2019-03-08 15:09:13 -07:00
Simon Redman
1ec20886a8 [SMS App] Add highlighting to ConversationList view
Summary: Let the ListView use its default highlighting (did I not notice before?) and keep the currently-selected chat highlighted at all times

Test Plan:
 - Launch app
 - Use mouse or arrow keys to select a conversation. The highlight should follow the selected conversation

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: apol, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17612
2019-02-26 22:55:50 -07:00
Nicolas Fella
8548ebd032 Clean up includes 2019-02-03 01:44:22 +01:00
l10n daemon script
41e13c2e84 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-01-31 05:44:46 +01:00
l10n daemon script
864c83ffd0 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-01-25 05:33:10 +01:00
Simon Redman
3b92b0de1d Add dependency on kirigami to SMS app
Summary:
Resolves Bug 401255

Bonus: Disable some very noisy debugging from the SMS app

Test Plan:
 - Build KDE Connect with or without Kirigami
   - Verify successful build with no complaints about Kirigami
 - Build KDE Connect's Messenger:
   - Without Kirigami: Verify that CMake warns that Kirigami is not found
   - With Kirigami: Verify that app launches successfully

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: apol, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17572
2019-01-24 10:39:54 -07:00
Simon Redman
a14b39d541 [SMS App] Make sms app not crash when conversation is selected with no devices connected
Summary: This patch fixes T10184 and stops the SMS app from crashing when a conversation is selected but no devices are connected. It also allows the SMS app to access the cached messages in the ConversationsDbusInterface so the app is still slightly useful even when the device is disconnected.

Test Plan:
- Open sms app
- Open a few conversations
- Disconnect phone (Force close app?)
- Re-open a conversation which was previously opened
  - Verify that the messages appear. It is possible to scroll up to view any older cached messages too!
- Open a conversation which was not opened previously
  - Verify that a single messages is shown (since this was the only one in cache, from populating the list of all conversations)
  - Verify that attempting to scroll this conversation does nothing, but also does not crash the app

Note: Opening the app with no phone connected will cause it to lose its handle on the deviceId, so it can't spawn a new Dbus interface, so it will remain blank and empty. Solving that is a project for another day.

Reviewers: #kde_connect

Reviewed By: #kde_connect

Subscribers: apol, nicolasfella, kdeconnect

Tags: #kde_connect

Maniphest Tasks: T10184

Differential Revision: https://phabricator.kde.org/D17634
2019-01-22 18:55:27 -07:00
Simon Redman
5b213e6144 [SMS App] Improve filter
Summary:
- Allow filter box to handle keystrokes passed to the ListView
 - This is a little cheesy, but fixes T8341

- Pin filter box to always be visible

- Clear filter on Esc

Test Plan:
- Try typing a contact you would like to search for
 - Before: Every time you type a new letter, the filter box would lose focus and you would have to click it to give it focus again
 - Now: You can type smoothly

- Try scrolling the list
 - Before: The filter box disappeared off the top of the screen
 - Now: The filter box is always visible

- Try pressing escape
 - Before: Nothing
 - Now: Filter clears

- Bonus: When using the arrow keys to navigate, before the filter was manually handling those and the view would not loop. Now, the view loops if you try to select an item past the beginning or end (Easiest to see with highlighting from D17612)

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: kdeconnect

Tags: #kde_connect

Maniphest Tasks: T8341

Differential Revision: https://phabricator.kde.org/D17614
2018-12-17 09:25:56 -07:00
Simon Redman
657dede4bf Add contributors to smsapp QML files 2018-12-15 17:26:44 -07:00
Nicolas Fella
af9eedad47 Remove deprecated ApplicationHeader 2018-12-14 18:15:07 +01:00
Simon Redman
2c35c1af51 [SMS App] Allow scrolling up to load and display older messages
Summary:
Scroll up to show older messages

Newly received messages will not force the view to the bottom unless the new message is being added "very close" to the visible area

Test Plan:
Message History:
 - Open conversation
 - Scroll/Drag up to load older messages

New Message:
 - Open conversation
 - Scroll to bottom
 - Verify that a newly-received or newly-sent message is added to the GUI
 - Scroll up
 - Verify that sending/receiving a message does not disturb the view
 - Scroll back to verify that the new message was indeed added to the list

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: apol, nicolasfella, kdeconnect

Tags: #kde_connect

Maniphest Tasks: T9556

Differential Revision: https://phabricator.kde.org/D15979
2018-12-12 22:50:50 -07:00
Simon Redman
7025fd6795 Un-break build. Apparently I didn't test as I thought I had. 2018-12-12 22:49:33 -07:00
Simon Redman
019e8d6a1c [SMS App] Make requestMoreMessages asynchronous, blocking, and caching
Summary:
The most serious change from this patch is to move the asynchronous replying to a request from the app for more messages to a newly-spawned, self-destructing thread. Within that thread, we block until the remote device replies with the requested messages.

All gotten messages are cached in the ConversationDbusInterface, so all future requests are fast and don't hit the remote device.

Test Plan: After applying this diff, the messaging app should show 10 messages every time it is opened

Reviewers: #kde_connect, nicolasfella, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, apol, nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16475
2018-12-12 22:42:56 -07:00
l10n daemon script
baef9265d9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-12-02 05:23:51 +01:00
Billy Laws
c6fc4d92b7 Make the message TextField expanding, wrapping and scrollable
Summary:
A scrollbar will show if the entered text fills more than 1/3rd
of the screen, pressing enter will send the message and shift +
enter will add a new line.

Reviewers: #kde_connect, sredman

Reviewed By: #kde_connect, sredman

Subscribers: sredman, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17224
2018-11-29 18:02:42 +00:00
Aleix Pol
7ef1da4914 Fix comment 2018-11-26 20:42:18 +01:00
Nicolas Fella
b435ab1f46 Use Q_ENUM instead of Q_ENUMS 2018-11-26 00:19:08 +01:00
Simon Redman
73191d8565 [SMS App] Don't set font size, which causes warnings to be printed
Summary:
Whenever a ConversationMessage was constructed, a warning was printed saying "Both point size and pixel size set. Using pixel size." Stop double-setting the font size and the warnings stop

This may be system-specific because I don't see where we are setting the font's point size. I will test this on a few different systems (I haven't yet) and I hope others will test it on their system!

Note that this is easiest to test when applied on top of D15979 so you can scroll up to cause more messages to be constructed

Test Plan:
Before patch: Experience many warnings when using the SMS app
After patch: Experience fewer (0?) warnings when using the SMS app

Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16769
2018-11-10 09:44:45 -07:00
Nicolas Fella
e26af48062 Remove unneeded import 2018-11-09 19:32:53 +01:00
Simon Redman
70926fbeaf [SMS App] Clean up runtime warning about undefined behavior
Summary: Move ColumnLayout containing text elements inside of the graphical bounding rectangle

Test Plan:
Pre patch:
 - Launch messaging app
 - Open conversation
 - Notice huge spew of warnings like: "qrc:/qml/ChatMessage.qml:84:5: QML ColumnLayout: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead."
Post patch:
 - Launch messaging app
 - Open conversation
 - No warnings about undefined behavior

Reviewers: apol

Reviewed By: apol

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16534
2018-10-31 08:47:19 -06:00
Simon Redman
e6d84ece34 Replaces tabs with spaces (properly) 2018-10-30 14:03:16 -06:00
Simon Redman
e9d5c9e27e Revert "Replace tabs with spaces in messaging app"
This reverts commit 6657dff8cf.
2018-10-30 14:01:13 -06:00
Simon Redman
6657dff8cf Replace tabs with spaces in messaging app 2018-10-30 13:58:50 -06:00