Commit graph

127 commits

Author SHA1 Message Date
Aniket Kumar
520d2a5695 Move ConversationsSortFilterProxyModel class from conversationlistmodel files to its own files
## Summary

Currently `OurSortFilterProxyModel` class is implemented in the same file with `ConversationListModel` class, which would likely grow in the future.

This MR separates `OurSortFilterProxyModel` class into its own separate file renaming it to `ConversationsSortFilterProxyModel`

https://invent.kde.org/kde/kdeconnect-kde/-/merge_requests/229
2020-03-29 18:25:07 +00:00
Jiří Wolker
365791dc59 Show remaining character count in SMS app
## Summary

This adds character counter below the “Send” button in SMS conversation. It
uses format XXX/Y where XXX is number of characters that can be added
without splitting the SMS into multiple messages (see article
Concatenated SMS on Wikipedia). Y is number of messages in in current
concatenated SMS. The counter is not visible when insertion of 10 7-bit
or 16-bit (depends on SMS encoding) does not create concatenated SMS.

SMS encoding is automatically guessed. 8-bit encodings are not
supported. If the message contains characters that are not supported by GSM 7-bit
encoding, counter automatically switches to UCS-2.

## Test Plan

Try entering some text that is longer than 150 characters in [GSM 03.38 encoding][1] or 60 characters in UCS-2. Number of remaining characters should be visible below the “Send” button. The character counter should show `0` at exactly 160 or 70 characters. Inserting one character should switch the counter to [Concatenated SMS][2] mode when number of messages is shown.

It should show exactly same number as SMS app in Android.

## Screenshots

These images are in APNG.

![grab.apng](/uploads/21ae23f2fa75c7aca487e61ddce94644/grab.apng)
![grab-cz.apng](/uploads/785e670a8598c5a65a4209f17e75f578/grab-cz.apng)

[1]: https://en.wikipedia.org/w/index.php?oldid=932080074#GSM_7-bit_default_alphabet_and_extension_table_of_3GPP_TS_23.038_/_GSM_03.38
[2]: https://en.wikipedia.org/w/index.php?oldid=943185255#Message_size
2020-03-22 18:47:12 +00:00
Aniket Kumar
f211d7e401 Add feature to start new conversation with existing contacts
## Summary

Start a conversation with contacts having no previous conversation with.

It is currently only possible to use the messaging app to send a message to a conversation which already exists.

This patch implements this feature by integrating all contacts having no prior conversation with the recent conversations in the recent conversation list and at the bottom in a sorted manner, something like this,

The contacts are stored in the recent conversation list model as a conversation but with INVALID conversation ID and INVALID conversation DATE.

## Testing

Testing just needs kdeconnect daemon to be recompiled and executed.
2020-03-21 22:57:28 +00:00
Nicolas Fella
af94100952 Move QAbstractItemModel QML workaround to declarativeplugin 2020-03-14 16:44:24 +01:00
Simon Redman
751bca008c Add loading notice while loading conversations 2020-02-03 01:37:25 +00:00
Laurent Montel
0f707cc709 It alreadys added by kaboutdata 2020-01-12 14:46:21 +01:00
Yuri Chornoivan
01c4d0411b Fix minor EBN issues 2019-12-22 09:49:55 +02:00
Yuri Chornoivan
f84b3c8c11 Fix localization of app and smsapp. Patch mainly by Victor Ryzhykh. 2019-12-21 09:59:36 +02:00
Nicolas Fella
a47fbe7215 [smsapp] Move aboutpage action into global drawer/menu 2019-12-19 23:18:11 +01:00
l10n daemon script
56880448fd 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-11-30 05:34:44 +01:00
l10n daemon script
cb307e16b2 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-11-17 05:06:27 +01:00
Yuri Chornoivan
bef029b8f5 Add i18n() 2019-10-23 22:26:33 +03:00
Simon Redman
9c91042441 Add loading indicator while loading conversations 2019-08-24 10:29:44 -07:00
l10n daemon script
392d287b64 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-08-11 04:47:22 +02:00
Simon Redman
f56a24d519 Add Q_UNUSED to squelch warning 2019-07-31 14:35:54 -06:00
Simon Redman
2e04adf99c Fix never-ending loading by adding a new signal indicating the SMS plugin has received a reply (so is presumably done loading)
This may need to be reworked at some point for more advanced usecases (multiple apps listening to SMS, variable-length message requests, etc.) but it's fine for now

BUG 410095
2019-07-29 22:12:37 +02:00
Simon Redman
5b73348635 Add Commenting 2019-07-29 21:51:52 +02:00
Simon Redman
91765a354d Update ConversationMessage.qml to latest version used in Kaidan 2019-07-27 10:02:24 +00:00
Simon Redman
88e0ffa01a Always show sender's name 2019-07-23 13:43:01 +02:00
l10n daemon script
b7a6b1f00e 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-07-23 05:10:46 +02:00
Simon Redman
ecbe1acabe Change license string in About
We are GPLv3 since we use some Kaiden components
2019-07-22 19:42:40 +02:00
Nicolas Fella
2544d9b3b9 Include KPeople properly 2019-07-22 13:41:29 +02:00
Simon Redman
8d939e130f ## Summary: Add a spinning loading indicator while waiting to get messages from the phone
## Test Plan
- Open SMS conversation
- See nice spinner
2019-07-21 17:27:08 +00:00
Aleix Pol
c17972881b sms: Added opening kdeconnect-sms on the plasmoid and indicator
Add a menu entry on the kdeconnect-indicator within devices' submenu that opens kdeconnect-sms.
Also add it in the plasmoid in the device delegate.
2019-07-21 18:30:41 +02:00
Simon Redman
c08c254555 Update KAboutData 2019-07-21 17:44:51 +02:00
Simon Redman
bc468f1e07 Use proper theme setting for text colour 2019-07-21 16:42:16 +02:00
Matthijs Tijink
9c442455d2 Display the KDE Connect icon instead of the X icon 2019-07-21 11:32:39 +00:00
Aleix Pol
a8c28a7ff1 smsapp: Offer the default avatar if another wasn't found 2019-07-21 13:28:06 +02:00
Aleix Pol
a7ee4ef0c5 smsapp: cache persondata instances
We were instanciating them all the time and it became rather slow.

Reviewed by Simon
2019-07-21 13:19:12 +02:00
Simon Redman
19025fb287 Make the sms app load the proper number of messages to fill the initial screen and make it instantly show the most-recent message 2019-07-21 13:17:41 +02:00
Matthijs Tijink
a5f55acf0e Don't interpret HTML in SMS messages 2019-07-21 11:05:40 +00:00
Aleix Pol
f256e32fb2 smsapp: add main contextual actions
Includes an about page and a refresh button for the conversations.
2019-07-21 12:55:25 +02:00
Aleix Pol
ed9e3028be sms: improve the conversation delegate
Keep the two elements (name and last message) separate so we can elide
the texts on the right.
2019-07-21 12:35:19 +02:00
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