Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Mobile
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
192
Merge Requests
10
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Minds
Minds Mobile
Compare Revisions
acefded350759031fd650b721f8cc1e1e30862a0...9c90f317d40a43bde8f1c5eb2232432c69c6bb76
Source
9c90f317d40a43bde8f1c5eb2232432c69c6bb76
...
Target
acefded350759031fd650b721f8cc1e1e30862a0
Compare
Commits (2)
(fix) comment delete for owner of activity
· 405adce1
Martin Santangelo
authored
49 minutes ago
405adce1
Merge branch 'fix/comment-delete-activity-owner' into 'release/3.12.1'
· 9c90f317
Martin Santangelo
authored
12 minutes ago
Fix comments delete for activity owners See merge request
!450
9c90f317
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
95 additions
and
9 deletions
+95
-9
__tests__/activity/components/__snapshots__/Activity.js.snap
View file @
9c90f317
...
...
@@ -29,6 +29,7 @@ exports[`Activity component renders correctly 1`] = `
"description": "Congratulations! ",
"edited": "",
"guid": "activityguid0",
"isOwner": [Function],
"is_visible": true,
"mature": false,
"mature_visibility": false,
...
...
@@ -36,6 +37,7 @@ exports[`Activity component renders correctly 1`] = `
"ownerObj": UserModel {
"__list": null,
"guid": "824853017709780997",
"isOwner": [Function],
"subtype": false,
"time_created": "1522036284",
"type": "user",
...
...
@@ -87,6 +89,7 @@ exports[`Activity component renders correctly 1`] = `
"description": "Congratulations! ",
"edited": "",
"guid": "activityguid0",
"isOwner": [Function],
"is_visible": true,
"mature": false,
"mature_visibility": false,
...
...
@@ -94,6 +97,7 @@ exports[`Activity component renders correctly 1`] = `
"ownerObj": UserModel {
"__list": null,
"guid": "824853017709780997",
"isOwner": [Function],
"subtype": false,
"time_created": "1522036284",
"type": "user",
...
...
@@ -161,6 +165,7 @@ exports[`Activity component renders correctly 1`] = `
"description": "Congratulations! ",
"edited": "",
"guid": "activityguid0",
"isOwner": [Function],
"is_visible": true,
"mature": false,
"mature_visibility": false,
...
...
@@ -168,6 +173,7 @@ exports[`Activity component renders correctly 1`] = `
"ownerObj": UserModel {
"__list": null,
"guid": "824853017709780997",
"isOwner": [Function],
"subtype": false,
"time_created": "1522036284",
"type": "user",
...
...
@@ -263,6 +269,7 @@ exports[`Activity component renders correctly 1`] = `
"description": "Congratulations! ",
"edited": "",
"guid": "activityguid0",
"isOwner": [Function],
"is_visible": true,
"mature": false,
"mature_visibility": false,
...
...
@@ -270,6 +277,7 @@ exports[`Activity component renders correctly 1`] = `
"ownerObj": UserModel {
"__list": null,
"guid": "824853017709780997",
"isOwner": [Function],
"subtype": false,
"time_created": "1522036284",
"type": "user",
...
...
@@ -332,6 +340,7 @@ exports[`Activity component renders correctly 1`] = `
"description": "Congratulations! ",
"edited": "",
"guid": "activityguid0",
"isOwner": [Function],
"is_visible": true,
"mature": false,
"mature_visibility": false,
...
...
@@ -339,6 +348,7 @@ exports[`Activity component renders correctly 1`] = `
"ownerObj": UserModel {
"__list": null,
"guid": "824853017709780997",
"isOwner": [Function],
"subtype": false,
"time_created": "1522036284",
"type": "user",
...
...
@@ -397,6 +407,7 @@ exports[`Activity component renders correctly 1`] = `
"description": "Congratulations! ",
"edited": "",
"guid": "activityguid0",
"isOwner": [Function],
"is_visible": true,
"mature": false,
"mature_visibility": false,
...
...
@@ -404,6 +415,7 @@ exports[`Activity component renders correctly 1`] = `
"ownerObj": UserModel {
"__list": null,
"guid": "824853017709780997",
"isOwner": [Function],
"subtype": false,
"time_created": "1522036284",
"type": "user",
...
...
@@ -468,6 +480,7 @@ exports[`Activity component renders correctly 1`] = `
"description": "Congratulations! ",
"edited": "",
"guid": "activityguid0",
"isOwner": [Function],
"is_visible": true,
"mature": false,
"mature_visibility": false,
...
...
@@ -475,6 +488,7 @@ exports[`Activity component renders correctly 1`] = `
"ownerObj": UserModel {
"__list": null,
"guid": "824853017709780997",
"isOwner": [Function],
"subtype": false,
"time_created": "1522036284",
"type": "user",
...
...
@@ -532,6 +546,7 @@ exports[`Activity component renders correctly 1`] = `
"description": "Congratulations! ",
"edited": "",
"guid": "activityguid0",
"isOwner": [Function],
"is_visible": true,
"mature": false,
"mature_visibility": false,
...
...
@@ -539,6 +554,7 @@ exports[`Activity component renders correctly 1`] = `
"ownerObj": UserModel {
"__list": null,
"guid": "824853017709780997",
"isOwner": [Function],
"subtype": false,
"time_created": "1522036284",
"type": "user",
...
...
This diff is collapsed.
__tests__/activity/components/__snapshots__/ActivityScreen.js.snap
View file @
9c90f317
...
...
@@ -30,6 +30,7 @@ exports[`Activity screen component renders correctly with an entity as param 2`]
"description": "Congratulations! ",
"edited": "",
"guid": "activityguid0",
"isOwner": [Function],
"is_visible": true,
"mature": false,
"mature_visibility": false,
...
...
@@ -37,6 +38,7 @@ exports[`Activity screen component renders correctly with an entity as param 2`]
"ownerObj": UserModel {
"__list": null,
"guid": "824853017709780997",
"isOwner": [Function],
"subtype": false,
"time_created": "1522036284",
"type": "user",
...
...
@@ -79,6 +81,7 @@ exports[`Activity screen component renders correctly with an entity as param 2`]
"description": "Congratulations! ",
"edited": "",
"guid": "activityguid0",
"isOwner": [Function],
"is_visible": true,
"mature": false,
"mature_visibility": false,
...
...
@@ -86,6 +89,7 @@ exports[`Activity screen component renders correctly with an entity as param 2`]
"ownerObj": UserModel {
"__list": null,
"guid": "824853017709780997",
"isOwner": [Function],
"subtype": false,
"time_created": "1522036284",
"type": "user",
...
...
This diff is collapsed.
__tests__/blogs/__snapshots__/BlogsViewScreen.js.snap
View file @
9c90f317
...
...
@@ -37,6 +37,7 @@ exports[`blog view screen component should renders correctly 1`] = `
"header_bg": "1",
"header_top": "0",
"impressions": 100,
"isOwner": [Function],
"last_save": "1524843907",
"last_updated": "1524838665",
"license": "attribution-noncommercial-cc",
...
...
@@ -79,6 +80,7 @@ exports[`blog view screen component should renders correctly 1`] = `
"guid": 100,
"icontime": "1523515420",
"impressions": 100,
"isOwner": [Function],
"language": "en",
"legacy_guid": false,
"mature": "1",
...
...
@@ -228,6 +230,7 @@ exports[`blog view screen component should renders correctly 1`] = `
"header_bg": "1",
"header_top": "0",
"impressions": 100,
"isOwner": [Function],
"last_save": "1524843907",
"last_updated": "1524838665",
"license": "attribution-noncommercial-cc",
...
...
@@ -270,6 +273,7 @@ exports[`blog view screen component should renders correctly 1`] = `
"guid": 100,
"icontime": "1523515420",
"impressions": 100,
"isOwner": [Function],
"language": "en",
"legacy_guid": false,
"mature": "1",
...
...
@@ -402,6 +406,7 @@ exports[`blog view screen component should renders correctly 1`] = `
"header_bg": "1",
"header_top": "0",
"impressions": 100,
"isOwner": [Function],
"last_save": "1524843907",
"last_updated": "1524838665",
"license": "attribution-noncommercial-cc",
...
...
@@ -444,6 +449,7 @@ exports[`blog view screen component should renders correctly 1`] = `
"guid": 100,
"icontime": "1523515420",
"impressions": 100,
"isOwner": [Function],
"language": "en",
"legacy_guid": false,
"mature": "1",
...
...
@@ -555,6 +561,7 @@ exports[`blog view screen component should renders correctly 1`] = `
"header_bg": "1",
"header_top": "0",
"impressions": 100,
"isOwner": [Function],
"last_save": "1524843907",
"last_updated": "1524838665",
"license": "attribution-noncommercial-cc",
...
...
@@ -597,6 +604,7 @@ exports[`blog view screen component should renders correctly 1`] = `
"guid": 100,
"icontime": "1523515420",
"impressions": 100,
"isOwner": [Function],
"language": "en",
"legacy_guid": false,
"mature": "1",
...
...
@@ -699,6 +707,7 @@ exports[`blog view screen component should renders correctly 1`] = `
"header_bg": "1",
"header_top": "0",
"impressions": 100,
"isOwner": [Function],
"last_save": "1524843907",
"last_updated": "1524838665",
"license": "attribution-noncommercial-cc",
...
...
@@ -741,6 +750,7 @@ exports[`blog view screen component should renders correctly 1`] = `
"guid": 100,
"icontime": "1523515420",
"impressions": 100,
"isOwner": [Function],
"language": "en",
"legacy_guid": false,
"mature": "1",
...
...
This diff is collapsed.
__tests__/channel/__snapshots__/ChannelScreen.js.snap
View file @
9c90f317
...
...
@@ -94,6 +94,7 @@ exports[`Channel screen component should renders correctly 1`] = `
"guid": 1,
"icontime": "1523515420",
"impressions": 100,
"isOwner": [Function],
"language": "en",
"legacy_guid": false,
"mature": "1",
...
...
@@ -358,6 +359,7 @@ exports[`Channel screen component should renders correctly 1`] = `
"guid": 1,
"icontime": "1523515420",
"impressions": 100,
"isOwner": [Function],
"language": "en",
"legacy_guid": false,
"mature": "1",
...
...
@@ -618,6 +620,7 @@ exports[`Channel screen component should show closed channel message 1`] = `
"guid": 1,
"icontime": "1523515420",
"impressions": 100,
"isOwner": [Function],
"language": "en",
"legacy_guid": false,
"mature": "1",
...
...
@@ -903,6 +906,7 @@ exports[`Channel screen component should show closed channel message 1`] = `
"guid": 1,
"icontime": "1523515420",
"impressions": 100,
"isOwner": [Function],
"language": "en",
"legacy_guid": false,
"mature": "1",
...
...
This diff is collapsed.
__tests__/channel/header/__snapshots__/ChannelHeader.js.snap
View file @
9c90f317
...
...
@@ -208,7 +208,7 @@ exports[`channel header component owner should render correctly 1`] = `
}
>
<View
accessibilityLabel="
Edit your channel settings
"
accessibilityLabel="
Subscribe to this channel
"
accessible={true}
focusable={true}
isTVSelectable={true}
...
...
@@ -246,7 +246,56 @@ exports[`channel header component owner should render correctly 1`] = `
}
>
Edit
Subscribe
</Text>
</View>
<View
accessibilityLabel="More"
accessible={true}
focusable={true}
isTVSelectable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"alignItems": "center",
"backgroundColor": "white",
"borderColor": "#4690D6",
"borderRadius": 20,
"borderWidth": 1,
"flexDirection": "row",
"justifyContent": "center",
"margin": 4,
"opacity": 1,
"padding": 4,
}
}
>
<Text
style={
Array [
Object {
"color": "#4690D6",
},
Array [
Object {
"marginLeft": 5,
},
Object {
"marginRight": 5,
},
],
]
}
>
More
</Text>
</View>
...
...
This diff is collapsed.
src/comments/Comment.js
View file @
9c90f317
...
...
@@ -135,6 +135,7 @@ class Comment extends Component {
<
/View
>
<
CommentActionSheet
entity
=
{
this
.
props
.
entity
}
comment
=
{
this
.
props
.
comment
}
onSelection
=
{
this
.
onSelection
}
ref
=
{
this
.
actionSheetRef
}
...
...
This diff is collapsed.
src/comments/CommentActionSheet.js
View file @
9c90f317
...
...
@@ -90,6 +90,8 @@ export default class CommentActionSheet extends Component {
}
else
{
actions
.
push
(
i18n
.
t
(
'
removeExplicit
'
)
)
}
}
else
if
(
this
.
props
.
entity
.
isOwner
())
{
actions
.
push
(
i18n
.
t
(
'
delete
'
)
);
}
actions
.
push
(
i18n
.
t
(
'
report
'
)
);
...
...
This diff is collapsed.
src/common/BaseModel.js
View file @
9c90f317
...
...
@@ -95,6 +95,13 @@ export default class BaseModel {
}
}
/**
* Return if the current user is the owner of the activity
*/
isOwner
=
()
=>
{
return
this
.
ownerObj
&&
sessionService
.
guid
===
this
.
ownerObj
.
guid
;
}
/**
* Update model data
* @param {Object} data
...
...
This diff is collapsed.
src/newsfeed/ActivityModel.js
View file @
9c90f317
...
...
@@ -104,13 +104,6 @@ export default class ActivityModel extends BaseModel {
FastImage
.
preload
([
this
.
getThumbSource
(
size
)]);
}
/**
* Return if the current user is the owner of the activity
*/
isOwner
()
{
return
sessionService
.
guid
==
this
.
ownerObj
.
guid
;
}
shouldBeBlured
()
{
const
user
=
sessionService
.
getUser
();
...
...
This diff is collapsed.