Commit graph

228 commits

Author SHA1 Message Date
Nicolas Fella
e38cdb111b Add missing references to loop variable 2020-07-29 00:07:40 +02:00
l10n daemon script
10de7b3763 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"
2020-07-23 09:50:37 +02:00
Aniket Kumar
af8a5bc49b Enabled seding of multi-target messages in SMS app. 2020-07-08 14:23:13 +05:30
Aniket Kumar
0cee486a62 Fixed the wrapMode property value of TextArea from non existing TextArea.wrap to TextEdit.Wrap. 2020-07-08 14:15:30 +05:30
l10n daemon script
0c32010a28 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"
2020-07-06 05:30:08 +02:00
Nicolas Fella
c8a87db367 Merge branch 'release/20.04' 2020-07-05 15:49:58 +02:00
Ashvin Nihalani
74c6b71e04 UI Improvements
Removed Clutter Single Party Conversation
Added Name ti Multiparty
Changed Default Icon in Conversation List
2020-07-05 12:51:01 +00:00
Nicolas Fella
1315d9b9eb [smsapp] Switch displayName and shortDescription
The former is used as the window title and as title in the about page. I think 'KDE Connect SMS' is more appropriate there.
2020-07-05 12:32:03 +00:00
Ashvin Nihalani
c333f2af17 [SMS App] Select Message Text
Switched from QT Label to Text Edit as QA Label is not allowed to select text
https://stackoverflow.com/questions/49784099/qml-how-to-make-text-or-label-selectable
https://bugreports.qt.io/browse/QTBUG-14077

BUG: 418630 - Cannot select text in messaging app
2020-07-05 00:49:31 +00:00
Nicolas Fella
752070add9 Enable highdpi icons 2020-07-01 22:33:08 +02:00
Nicolas Fella
166a88072b [smsapp] Rework message items
The current implementation seems to have an issue with an undetected binding loop that causes lockup. During investigation I figured that the code was way to complex and brittle for what we need.

This is a cleaner reimplementation. It also replaces the custom Avatar component with the one from Kirigami.

The looks are subject to tweaking of course
2020-07-01 19:15:45 +00:00
Aniket Kumar
2b8e95caac [smsapp] Replace custom ListItem with Kirigami's BasicListItem 2020-06-27 18:22:00 +02:00
l10n daemon script
e44e4a4c19 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"
2020-06-20 05:10:40 +02:00
l10n daemon script
373557cd26 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"
2020-06-18 08:27:38 +02:00
l10n daemon script
653a708727 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"
2020-06-18 05:39:20 +02:00
l10n daemon script
5fe8d7ea90 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"
2020-06-17 16:50:11 +02:00
l10n daemon script
e873eddcde 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"
2020-06-17 14:06:59 +02:00
l10n daemon script
046a572542 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"
2020-06-07 08:58:38 +02:00
Simon Redman
a9f151947b [SMS App] Stop ChatMessage.qml from rendering HTML 2020-06-06 13:29:06 +00:00
Simon Redman
70c712808f [SMS App] Use helper rather than hard-coding MessageTypeSent in the code 2020-05-29 19:58:54 -07:00
Rihards Skuja
60bf200723 smsapp: fix reference to undefined var in QML
Launching smsapp prints:
qrc:/qml/main.qml:36: ReferenceError: _initialMessage is not defined

This patch applies the changes made to the property from C++ in
c17972881b to QML.
2020-05-30 02:50:13 +00:00
Antonio Larrosa
1d36164230 Use ecm_qt_declare_logging_category to declare the logging categories
This automatizes the generation of logging categories so a
kdeconnect-kde.categories is generated and installed to
/usr/share/qlogging-categories5/ so kdebugsettings can use it.

Also, sets the default logging level to Warning. So now the logs
of users won't be filled with debug messages but they can
modify the configuration easily with kdebugsettings.
2020-05-26 18:55:47 +02:00
Aniket Kumar
fca66244ab improved sorting and filtering methods 2020-05-19 10:07:06 +05:30
Aniket Kumar
d0367f11fb Removing earlier hack to pass an address as a string instead of ConversationAdress type. 2020-05-18 08:11:26 +05:30
Nicolas Fella
785f70c28f [smsapp] Fix starting new conversation 2020-05-12 01:05:38 +02:00
Simon Redman
b8aab3407a [SMS App] Sms helper improvements 2020-05-09 16:50:08 +00:00
Simon Redman
95a62f4fdb [SMS App] Convert tabs to 2 spaces in ChatMessage.qml
How did those get there?
2020-04-23 19:13:44 -07:00
Jiří Wolker
2ef5cd4551 [SMS App] Make SMS message field scrollable
## Summary

This patch makes SMS message field scrollable and limits its height to ⅓
of window height (or ⅔ for smaller windows) so messages in conversation
are shown even when writing very long messages.

## Test Plan (and screenshots)

<small>These screenshots are in APNG and WEBP formats. Download them if
your browser does not support this format.</small>

### Before:

Message field height was not limited. Message field could be even higher
than window. That makes first lines of this field and messages in
conversation inaccessible.

![grab-noscroll.apng](/uploads/70a44ec3abd0e0707cf69f53ee832542/grab-noscroll.apng)

### After:

Message field height is limited to ⅓ or ⅔ of window height. When text
content reaches this threshold, scroll bars will show up.

![grab-scroll.webp](/uploads/489b9bb197a092f715bc2160acc7fd42/grab-scroll.webp)
2020-04-23 17:24:51 -07:00
Jiří Wolker
6abe790aa4 [SMS App] Make SMS character counter width only grow
SMS character counter was changing its width (both growing and
shrinking) so it also resized message field (and that caused text
reflow). This patch makes counter width only grow.

Type SMS that is long enough to make SMS character counter wider than
“Send” button. Remove the text (leave there 150 or 60 chars to keep it
visible). Character counter should keep its width.
2020-04-23 17:19:15 -07:00
Aniket Kumar
1ed998a9b3 some fixes 2020-04-23 02:31:28 +00:00
Aniket Kumar
97fea5e692 Apply suggestion to smsapp/qml/ConversationList.qml 2020-04-23 02:31:28 +00:00
Aniket Kumar
8b54d0b2a6 Apply suggestion to smsapp/conversationssortfilterproxymodel.cpp 2020-04-23 02:31:28 +00:00
Aniket Kumar
d712b1067f Apply suggestion to smsapp/conversationssortfilterproxymodel.cpp 2020-04-23 02:31:28 +00:00
Aniket Kumar
cd0259aba6 Added searching on both fields all the time and generalized check for address 2020-04-23 02:31:28 +00:00
Aniket Kumar
518f161b4f added message diaplay for no matched contacts 2020-04-23 02:31:28 +00:00
Aniket Kumar
b0cffea4a1 minor fix 2020-04-23 02:31:28 +00:00
Aniket Kumar
6827f31aa1 UI chnages and sorting/filtering chnages for multitarget converations 2020-04-23 02:31:28 +00:00
Aniket Kumar
9db5634a6c Made New button static in UI 2020-04-23 02:31:28 +00:00
Aniket Kumar
75c87e6fdf code adjust 2020-04-23 02:31:28 +00:00
Aniket Kumar
d7c93488a8 added new arbitrary contact feature 2020-04-23 02:31:28 +00:00
Aniket Kumar
d26cfd427f Feature to add arbitrray phone numbers 2020-04-23 02:31:28 +00:00
l10n daemon script
da0089c741 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"
2020-04-09 11:01:28 +02:00
l10n daemon script
5ef95c7c25 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"
2020-04-09 06:26:57 +02:00
Nicolas Fella
1013f23e1b Fix trailing whitespace 2020-04-08 10:48:12 +02:00
Nicolas Fella
570b8776c6 Use QString::isEmpty 2020-04-08 10:47:47 +02:00
Nicolas Fella
b35d96b471 Add some const 2020-04-08 10:46:35 +02:00
Nicolas Fella
f8674db931 Don't recreate QRegularExpression for leading zeroes each time
Creating a QRegularExpression is quite expensive and we use the same expression for each run. Sharing it between the runs leads to a significant performance improvement.
2020-04-08 10:25:34 +02:00
l10n daemon script
1634126eb5 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"
2020-04-07 10:16:35 +02:00
l10n daemon script
0e04769a43 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"
2020-04-07 06:11:40 +02:00
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
l10n daemon script
87d58643a2 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"
2020-03-17 10:05:04 +01:00
l10n daemon script
201be5d898 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"
2020-03-16 10:21:09 +01: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