Add support for venues
This commit is contained in:
parent
d92ea9fbae
commit
f19b3ae4cb
9 changed files with 33 additions and 5 deletions
|
@ -10,6 +10,7 @@ Fernschreiber wouldn't be the same without all the people helping in making it b
|
||||||
|
|
||||||
### Code (Features, Bugfixes, Optimizations etc.)
|
### Code (Features, Bugfixes, Optimizations etc.)
|
||||||
- Chat list model, TDLib receiver, project dependencies: [Slava Monich](https://github.com/monich)
|
- Chat list model, TDLib receiver, project dependencies: [Slava Monich](https://github.com/monich)
|
||||||
|
- Location support, project dependencies: [jgibbon](https://github.com/jgibbon)
|
||||||
|
|
||||||
### Translations
|
### Translations
|
||||||
- Chinese: [dashinfantry](https://github.com/dashinfantry)
|
- Chinese: [dashinfantry](https://github.com/dashinfantry)
|
||||||
|
|
|
@ -77,7 +77,10 @@ function getMessageText(message, simple) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (message.content['@type'] === 'messageLocation') {
|
if (message.content['@type'] === 'messageLocation') {
|
||||||
return qsTr("sent a location");
|
return simple ? qsTr("sent a location") : "";
|
||||||
|
}
|
||||||
|
if (message.content['@type'] === 'messageVenue') {
|
||||||
|
return simple ? qsTr("sent a venue") : ( "<b>" + message.content.venue.title + "</b>, " + message.content.venue.address );
|
||||||
}
|
}
|
||||||
if (message.content['@type'] === 'messageContactRegistered') {
|
if (message.content['@type'] === 'messageContactRegistered') {
|
||||||
return qsTr("has registered with Telegram");
|
return qsTr("has registered with Telegram");
|
||||||
|
|
|
@ -496,7 +496,7 @@ Page {
|
||||||
videoPreviewLoader.active = (( display.content['@type'] === "messageVideo" ) || ( display.content['@type'] === "messageAnimation" ));
|
videoPreviewLoader.active = (( display.content['@type'] === "messageVideo" ) || ( display.content['@type'] === "messageAnimation" ));
|
||||||
audioPreviewLoader.active = (( display.content['@type'] === "messageVoiceNote" ) || ( display.content['@type'] === "messageAudio" ));
|
audioPreviewLoader.active = (( display.content['@type'] === "messageVoiceNote" ) || ( display.content['@type'] === "messageAudio" ));
|
||||||
documentPreviewLoader.active = ( display.content['@type'] === "messageDocument" );
|
documentPreviewLoader.active = ( display.content['@type'] === "messageDocument" );
|
||||||
locationPreviewLoader.active = ( display.content['@type'] === "messageLocation" )
|
locationPreviewLoader.active = ( display.content['@type'] === "messageLocation" || ( display.content['@type'] === "messageVenue" ))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -736,8 +736,8 @@ Page {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.width * 2 / 3
|
height: parent.width * 2 / 3
|
||||||
chatId: display.id
|
chatId: display.id
|
||||||
locationData: ( display.content['@type'] === "messageLocation" ) ? display.content.location : ""
|
locationData: ( display.content['@type'] === "messageLocation" ) ? display.content.location : ( ( display.content['@type'] === "messageVenue" ) ? display.content.venue.location : "" )
|
||||||
visible: display.content['@type'] === "messageLocation"
|
visible: ( display.content['@type'] === "messageLocation" || display.content['@type'] === "messageVenue" )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -496,7 +496,7 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>sent a location</source>
|
<source>sent a location</source>
|
||||||
<translation>hat einen Ort geschickt</translation>
|
<translation>hat einen Standort geschickt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>joined this chat</source>
|
<source>joined this chat</source>
|
||||||
|
@ -518,5 +518,9 @@
|
||||||
<source>%1K</source>
|
<source>%1K</source>
|
||||||
<translation>%1T</translation>
|
<translation>%1T</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>sent a venue</source>
|
||||||
|
<translation>hat einen Ort geschickt</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
</TS>
|
</TS>
|
||||||
|
|
|
@ -518,5 +518,9 @@
|
||||||
<source>%1K</source>
|
<source>%1K</source>
|
||||||
<translation>%1K</translation>
|
<translation>%1K</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>sent a venue</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
</TS>
|
</TS>
|
||||||
|
|
|
@ -518,5 +518,9 @@
|
||||||
<source>%1K</source>
|
<source>%1K</source>
|
||||||
<translation>%1K</translation>
|
<translation>%1K</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>sent a venue</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
</TS>
|
</TS>
|
||||||
|
|
|
@ -518,5 +518,9 @@
|
||||||
<source>%1K</source>
|
<source>%1K</source>
|
||||||
<translation>%1K</translation>
|
<translation>%1K</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>sent a venue</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
</TS>
|
</TS>
|
||||||
|
|
|
@ -518,5 +518,9 @@
|
||||||
<source>%1K</source>
|
<source>%1K</source>
|
||||||
<translation>%1T</translation>
|
<translation>%1T</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>sent a venue</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
</TS>
|
</TS>
|
||||||
|
|
|
@ -518,5 +518,9 @@
|
||||||
<source>%1K</source>
|
<source>%1K</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>sent a venue</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
</TS>
|
</TS>
|
||||||
|
|
Loading…
Reference in a new issue