Skip to content
This repository has been archived by the owner on Dec 12, 2018. It is now read-only.

Commit

Permalink
Merge pull request #149 from ubports/xenial
Browse files Browse the repository at this point in the history
Catching up in master & switching default branch again ;)
  • Loading branch information
Flohack74 authored Mar 10, 2018
2 parents 8c88e64 + b5ec5f5 commit fc22c25
Show file tree
Hide file tree
Showing 12 changed files with 143 additions and 118 deletions.
2 changes: 1 addition & 1 deletion telegram/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ int main(int argc, char *argv[])
AsemanApplication app(argc, argv);
app.setApplicationName("Telegram");
app.setApplicationDisplayName("Telegram");
app.setApplicationVersion("2.5.2.0");
app.setApplicationVersion("2.5.3.0");
app.setOrganizationDomain("com.ubuntu.telegram");
app.setOrganizationName("com.ubuntu.telegram");
app.setWindowIcon(QIcon(":/qml/icons/telegram.png"));
Expand Down
11 changes: 9 additions & 2 deletions telegram/app/qml/AccountMessageList.qml
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,15 @@ Rectangle {
header: Item{ width: 4; height: units.dp(4) }
footer: Item{ width: 4; height: units.dp(4) }

onAtYBeginningChanged: if( atYBeginning && contentHeight>height &&
currentDialog != telegramObject.nullDialog ) messages_model.loadMore()
// onAtYBeginningChanged: if( atYBeginning && contentHeight>height &&
// currentDialog != telegramObject.nullDialog )
onContentYChanged:
if (contentHeight>height && (contentY - originY) * (height / contentHeight) < 250)
{
console.log("Reached loading window: ", (contentY - originY) * (height / contentHeight) )
messages_model.loadMore()
}


section.property: "unreaded"
section.criteria: ViewSection.FullString
Expand Down
2 changes: 1 addition & 1 deletion telegram/app/qml/AccountPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Page {
extension: profiles.count > 1 ? sections : null
trailingActionBar.actions: Action {
visible: !telegram.connected || !Connectivity.online
iconName: !Connectivity.online? "sync-paused" : !telegram.connected? "sync-updating" : "ok"
iconName: telegram.busy? "sync-updating" : !telegram.connected? "sync-error" : "sync-paused"
}
}

Expand Down
2 changes: 1 addition & 1 deletion telegram/app/qml/AccountSendMessage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Rectangle {
property int dialogId: isChannel ? currentDialog.peer.channelId : isChat ? currentDialog.peer.chatId : currentDialog.peer.userId
property bool isMuted: telegramObject.userData.isMuted(dialogId)

property bool channelToolbar: isChannel && !chat.megaGroup && false //need to replace 'false' with the property saying if you can write messages to the channel or not
property bool channelToolbar: isChannel && !chat.megaGroup && !(chat.isCreator || chat.isEditor || chat.isModerator)

signal accepted( string text, int inReplyTo )
signal copyRequest()
Expand Down
2 changes: 1 addition & 1 deletion telegram/app/qml/MessageReplyItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Item {

property Message realMessage: (message && message.replyToMsgId != 0) ? telegram.message(message.replyToMsgId, dialog.peer.channelId) : replyMessage

property real maximumWidth: 100
property real maximumWidth: 90

signal messageFocusRequest(int msgId, int channelId)

Expand Down
5 changes: 2 additions & 3 deletions telegram/app/qml/components/MessagesListItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ListItem {
? action_item.height : column.height + frameMargins*2 + textMargins*2
property real minimumHeight: contact_image.visible ? contact_image.height + units.gu(1) : 0

property real maximumWidth: width * 0.75 - (contact_image.visible ? contact_image.width : 0)
property real maximumWidth: width * 0.85 - (contact_image.visible ? contact_image.width : 0)
property real minimumWidth: 0

property real textMargins: units.dp(4)
Expand Down Expand Up @@ -128,8 +128,7 @@ ListItem {
topMargin: units.gu(.5)
}
height: units.gu(5)
visible: message_item.visibleNames && !message.out && !(dialogIsChannel && !message_item.chat.megagroup)

visible: message_item.visibleNames && !message.out && !(dialogIsChannel && !message_item.chat.megaGroup)
telegram: telegramObject
user: message_item.user
isChat: false
Expand Down
4 changes: 2 additions & 2 deletions telegram/app/qml/components/TelegramHeader.qml
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ PageHeader {
Rectangle {
id: connectingIndicator
anchors.fill: headerImage
visible: isConnecting || !Connectivity.online
visible: isConnecting || !Connectivity.online || telegram.busy
color: "white"
Icon {
name: isConnecting? "sync-updating" : "sync-paused"
name: telegram.busy? "sync-updating" : isConnecting? "sync-error" : "sync-paused"
anchors.fill: parent
}
SequentialAnimation {
Expand Down
2 changes: 1 addition & 1 deletion telegram/app/qml/js/version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
var version = "2.5.2.0";
var version = "2.5.3.0";
1 change: 0 additions & 1 deletion telegram/app/telegram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ QSize Cutegram::imageSize(const QString &pt)
return QSize();

QImage img(path);
qWarning() << "Image " << path << ", image size: " << img.size().width() << "x" << img.size().height();
return img.size();
}

Expand Down
2 changes: 1 addition & 1 deletion telegram/manifest.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"scope": "scope"
}
},
"version": "2.5.2.0",
"version": "2.5.3.0",
"maintainer": "UBports Telegram Team <[email protected]>"
}
Loading

0 comments on commit fc22c25

Please sign in to comment.