Merge lp:~libqtelegram-team/telegram-app/telegram-app-fix-linking-numbers into lp:telegram-app/app-dev

Proposed by Penk Chen
Status: Merged
Merged at revision: 63
Proposed branch: lp:~libqtelegram-team/telegram-app/telegram-app-fix-linking-numbers
Merge into: lp:telegram-app/app-dev
Diff against target: 17 lines (+5/-2)
1 file modified
components/TelegramDelegate.qml (+5/-2)
To merge this branch: bzr merge lp:~libqtelegram-team/telegram-app/telegram-app-fix-linking-numbers
Reviewer Review Type Date Requested Status
Michał Karnicki (community) Approve
Review via email: mp+235779@code.launchpad.net

Description of the change

Prevent checking for phone numbers in links that have already been processed, as in https://code.launchpad.net/~tiagosh/messaging-app/fix-share-links

To post a comment you must log in.
63. By Michał Karnicki

Remove line to fix linkify condition check.

Revision history for this message
Michał Karnicki (karni) wrote :

Removed one line. Tested, bugfix works as expected. penk, please make sure to bzr pull so you get revno 63 before merging to telegram-app-dev.

review: Approve
Revision history for this message
Penk Chen (penk) wrote :

Done

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components/TelegramDelegate.qml'
2--- components/TelegramDelegate.qml 2014-08-26 15:32:21 +0000
3+++ components/TelegramDelegate.qml 2014-09-24 11:53:55 +0000
4@@ -114,8 +114,11 @@
5 // replace line breaks
6 text = text.replace(/(\n)+/g, '<br />');
7 // check for links
8- text = BaLinkify.linkify(text);
9- // linkify phone numbers
10+ var htmlText = BaLinkify.linkify(text);
11+ if (htmlText !== text) {
12+ return htmlText
13+ }
14+ // linkify phone numbers if no web links were found
15 return text.replace(phoneExp, '<a href="tel:///$1">$1</a>');
16 }
17 }

Subscribers

People subscribed via source and target branches

to all changes: