Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sociald] Comments in Facebook and Twitter. Fixes JB#8407
This commit provides comments for Twitter, and an enhanced comments system for Facebook.
- Loading branch information
1 parent
813e393
commit d1bba00
Showing
10 changed files
with
646 additions
and
379 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,37 @@ | ||
import QtQuick 2.0 | ||
import Sailfish.Silica 1.0 | ||
|
||
Image { | ||
Item { | ||
id: container | ||
property string icon | ||
width: Theme.itemSizeExtraLarge | ||
height: Theme.itemSizeExtraLarge | ||
sourceSize { | ||
width: Theme.itemSizeExtraLarge | ||
height: Theme.itemSizeExtraLarge | ||
|
||
Rectangle { | ||
anchors.fill: parent | ||
color: Theme.highlightColor | ||
opacity: 0.5 | ||
} | ||
asynchronous: true | ||
fillMode: Image.PreserveAspectCrop | ||
source: { | ||
if (container.icon == "") { | ||
return container.icon | ||
} else if (container.icon.indexOf("http") == 0) { | ||
return container.icon | ||
} else if (container.icon.indexOf("/") == 0) { | ||
return "image://nemoThumbnail/" + container.icon | ||
} else { | ||
return "image://theme/" + container.icon | ||
|
||
Image { | ||
anchors.fill: parent | ||
sourceSize { | ||
width: container.width | ||
height: container.height | ||
} | ||
asynchronous: true | ||
fillMode: Image.PreserveAspectCrop | ||
source: { | ||
if (container.icon == "") { | ||
return container.icon | ||
} else if (container.icon.indexOf("http") == 0) { | ||
return container.icon | ||
} else if (container.icon.indexOf("/") == 0) { | ||
return "image://nemoThumbnail/" + container.icon | ||
} else { | ||
return "image://theme/" + container.icon | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import QtQuick 2.0 | ||
import Sailfish.Silica 1.0 | ||
|
||
Item { | ||
id: container | ||
property alias avatar: avatar.source | ||
property alias message: message.text | ||
property alias footer: footer.text | ||
property alias extra: extra.text | ||
property alias extraVisible: extra.visible | ||
|
||
height: commentColumn.height | ||
|
||
opacity: 0 | ||
Component.onCompleted: opacity = 1 | ||
Behavior on opacity { FadeAnimation {} } | ||
|
||
Rectangle { | ||
id: avatarPlaceholder | ||
width: Theme.iconSizeMedium | ||
height: Theme.iconSizeMedium | ||
color: Theme.highlightColor | ||
opacity: 0.5 | ||
} | ||
|
||
Image { | ||
id: avatar | ||
clip: true | ||
anchors.fill: avatarPlaceholder | ||
fillMode: Image.PreserveAspectCrop | ||
smooth: true | ||
} | ||
|
||
Column { | ||
id: commentColumn | ||
anchors { | ||
left: avatar.right | ||
leftMargin: Theme.paddingMedium | ||
top: avatar.top | ||
right: parent.right | ||
rightMargin: Theme.paddingLarge | ||
} | ||
|
||
Label { | ||
id: message | ||
text: model.contentItem.message | ||
width: parent.width | ||
font.pixelSize: Theme.fontSizeSmall | ||
horizontalAlignment: Text.AlignLeft | ||
wrapMode: Text.Wrap | ||
color: Theme.highlightColor | ||
} | ||
|
||
Label { | ||
id: footer | ||
opacity: 0.6 | ||
color: Theme.highlightColor | ||
width: parent.width | ||
font.pixelSize: Theme.fontSizeExtraSmall | ||
} | ||
|
||
Label { | ||
id: extra | ||
opacity: 0.6 | ||
color: Theme.highlightColor | ||
width: parent.width | ||
font.pixelSize: Theme.fontSizeExtraSmall | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.