Merge pull request #1271 from Ppjet6/issue-1252-bookmark-title
Fix #1252, incorrect bookmark icon title
This commit is contained in:
commit
98b27fbe0c
|
@ -6,6 +6,7 @@
|
||||||
- Use ES2015 modules instead of UMD.
|
- Use ES2015 modules instead of UMD.
|
||||||
- #1257 Prefer 'probably' over 'maybe' when evaluating audio play support.
|
- #1257 Prefer 'probably' over 'maybe' when evaluating audio play support.
|
||||||
- #1261 File upload not working
|
- #1261 File upload not working
|
||||||
|
- #1252 Correctly reflect the state in bookmark icon title.
|
||||||
|
|
||||||
## 4.0.3 (2018-10-22)
|
## 4.0.3 (2018-10-22)
|
||||||
|
|
||||||
|
|
|
@ -98,14 +98,19 @@ converse.plugins.add('converse-bookmarks', {
|
||||||
},
|
},
|
||||||
|
|
||||||
onBookmarked () {
|
onBookmarked () {
|
||||||
|
const { _converse } = this.__super__,
|
||||||
|
{ __ } = _converse;
|
||||||
|
|
||||||
const icon = this.el.querySelector('.toggle-bookmark');
|
const icon = this.el.querySelector('.toggle-bookmark');
|
||||||
if (_.isNull(icon)) {
|
if (_.isNull(icon)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.model.get('bookmarked')) {
|
if (this.model.get('bookmarked')) {
|
||||||
icon.classList.add('button-on');
|
icon.classList.add('button-on');
|
||||||
|
icon.title = __('Unbookmark this groupchat');
|
||||||
} else {
|
} else {
|
||||||
icon.classList.remove('button-on');
|
icon.classList.remove('button-on');
|
||||||
|
icon.title = __('Bookmark this groupchat');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user