mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 08:44:15 -04:00
Display a 'Set Topic' button if there is no topic or it's a 0-len string.
This commit is contained in:
parent
6bdb23449a
commit
e8f19b4c0d
3 changed files with 30 additions and 11 deletions
|
@ -51,7 +51,14 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput'])
|
|||
console.log("Warning: Already editing topic.");
|
||||
return;
|
||||
}
|
||||
$scope.topic.newTopicText = $rootScope.events.rooms[$scope.room_id]['m.room.topic'].content.topic;
|
||||
var topicEvent = $rootScope.events.rooms[$scope.room_id]['m.room.topic'];
|
||||
if (topicEvent) {
|
||||
$scope.topic.newTopicText = topicEvent.content.topic;
|
||||
}
|
||||
else {
|
||||
$scope.topic.newTopicText = "";
|
||||
}
|
||||
|
||||
$scope.topic.isEditing = true;
|
||||
},
|
||||
updateTopic: function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue