disable user functions when user is me

This commit is contained in:
Morgan McMillian 2016-10-21 08:50:17 -07:00
parent 97cb8d41a5
commit 305457091e
3 changed files with 8 additions and 5 deletions

View file

@ -158,6 +158,7 @@ Page {
} }
} }
imageSource: (user.you_follow) ? "asset:///icons/minus-circle.png" : "asset:///icons/ic_add.png" imageSource: (user.you_follow) ? "asset:///icons/minus-circle.png" : "asset:///icons/ic_add.png"
enabled: (_app.setting("username") === user.username) ? false : true
}, },
ActionItem { ActionItem {
title: (user.you_muted) ? qsTr("Unmute") : qsTr("Mute") title: (user.you_muted) ? qsTr("Unmute") : qsTr("Mute")
@ -170,6 +171,7 @@ Page {
} }
} }
imageSource: (user.you_muted) ? "asset:///icons/bell.png" : "asset:///icons/bell-slash.png" imageSource: (user.you_muted) ? "asset:///icons/bell.png" : "asset:///icons/bell-slash.png"
enabled: (_app.setting("username") === user.username) ? false : true
}, },
ActionItem { ActionItem {
title: (user.you_blocked) ? qsTr("Unblock") : qsTr("Block") title: (user.you_blocked) ? qsTr("Unblock") : qsTr("Block")
@ -182,6 +184,7 @@ Page {
} }
} }
imageSource: "asset:///icons/ic_cancel.png" imageSource: "asset:///icons/ic_cancel.png"
enabled: (_app.setting("username") === user.username) ? false : true
} }
] ]
} }

View file

@ -1 +1 @@
126 128

View file

@ -98,22 +98,22 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/ProfilePage.qml" line="163"/> <location filename="../assets/ProfilePage.qml" line="164"/>
<source>Unmute</source> <source>Unmute</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/ProfilePage.qml" line="163"/> <location filename="../assets/ProfilePage.qml" line="164"/>
<source>Mute</source> <source>Mute</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/ProfilePage.qml" line="175"/> <location filename="../assets/ProfilePage.qml" line="177"/>
<source>Unblock</source> <source>Unblock</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/ProfilePage.qml" line="175"/> <location filename="../assets/ProfilePage.qml" line="177"/>
<source>Block</source> <source>Block</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>