Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
b8107afa
Commit
b8107afa
authored
Mar 31, 2019
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix. Remove highlight from roster item when chatbox is closed.
parent
f0201e23
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
20 deletions
+20
-20
dist/converse.js
dist/converse.js
+11
-9
src/converse-rosterview.js
src/converse-rosterview.js
+9
-11
No files found.
dist/converse.js
View file @
b8107afa
...
@@ -59683,12 +59683,10 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_4__["default"].plugins
...
@@ -59683,12 +59683,10 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_4__["default"].plugins
if (_converse.isUniView()) {
if (_converse.isUniView()) {
const chatbox = _converse.chatboxes.get(this.model.get('jid'));
const chatbox = _converse.chatboxes.get(this.model.get('jid'));
if (chatbox) {
if (chatbox && chatbox.get('hidden') || !chatbox) {
if (chatbox.get('hidden')) {
this.el.classList.remove('open');
this.el.classList.remove('open');
} else {
} else {
this.el.classList.add('open');
this.el.classList.add('open');
}
}
}
}
}
},
},
...
@@ -60278,15 +60276,19 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_4__["default"].plugins
...
@@ -60278,15 +60276,19 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_4__["default"].plugins
/* -------- Event Handlers ----------- */
/* -------- Event Handlers ----------- */
_converse.api.listen.on('chatBoxesInitialized', () => {
_converse.api.listen.on('chatBoxesInitialized', () => {
_converse.chatboxes.on('change:hidden', chatbox =>
{
function highlightRosterItem(chatbox)
{
const contact = _converse.roster.findWhere({
const contact = _converse.roster.findWhere({
'jid': chatbox.get('jid')
'jid': chatbox.get('jid')
});
});
if (!_.isUndefined(contact)) {
if (!_.isUndefined(contact)) {
contact.trigger('highlight'
, contact
);
contact.trigger('highlight');
}
}
});
}
_converse.chatboxes.on('destroy', chatbox => highlightRosterItem(chatbox));
_converse.chatboxes.on('change:hidden', chatbox => highlightRosterItem(chatbox));
});
});
function initRoster() {
function initRoster() {
src/converse-rosterview.js
View file @
b8107afa
...
@@ -485,12 +485,10 @@ converse.plugins.add('converse-rosterview', {
...
@@ -485,12 +485,10 @@ converse.plugins.add('converse-rosterview', {
*/
*/
if
(
_converse
.
isUniView
())
{
if
(
_converse
.
isUniView
())
{
const
chatbox
=
_converse
.
chatboxes
.
get
(
this
.
model
.
get
(
'
jid
'
));
const
chatbox
=
_converse
.
chatboxes
.
get
(
this
.
model
.
get
(
'
jid
'
));
if
(
chatbox
)
{
if
((
chatbox
&&
chatbox
.
get
(
'
hidden
'
))
||
!
chatbox
)
{
if
(
chatbox
.
get
(
'
hidden
'
))
{
this
.
el
.
classList
.
remove
(
'
open
'
);
this
.
el
.
classList
.
remove
(
'
open
'
);
}
else
{
}
else
{
this
.
el
.
classList
.
add
(
'
open
'
);
this
.
el
.
classList
.
add
(
'
open
'
);
}
}
}
}
}
},
},
...
@@ -1009,16 +1007,16 @@ converse.plugins.add('converse-rosterview', {
...
@@ -1009,16 +1007,16 @@ converse.plugins.add('converse-rosterview', {
}
}
});
});
/* -------- Event Handlers ----------- */
/* -------- Event Handlers ----------- */
_converse
.
api
.
listen
.
on
(
'
chatBoxesInitialized
'
,
()
=>
{
_converse
.
api
.
listen
.
on
(
'
chatBoxesInitialized
'
,
()
=>
{
function
highlightRosterItem
(
chatbox
)
{
_converse
.
chatboxes
.
on
(
'
change:hidden
'
,
(
chatbox
)
=>
{
const
contact
=
_converse
.
roster
.
findWhere
({
'
jid
'
:
chatbox
.
get
(
'
jid
'
)});
const
contact
=
_converse
.
roster
.
findWhere
({
'
jid
'
:
chatbox
.
get
(
'
jid
'
)});
if
(
!
_
.
isUndefined
(
contact
))
{
if
(
!
_
.
isUndefined
(
contact
))
{
contact
.
trigger
(
'
highlight
'
,
contact
);
contact
.
trigger
(
'
highlight
'
);
}
}
});
}
_converse
.
chatboxes
.
on
(
'
destroy
'
,
chatbox
=>
highlightRosterItem
(
chatbox
));
_converse
.
chatboxes
.
on
(
'
change:hidden
'
,
chatbox
=>
highlightRosterItem
(
chatbox
));
});
});
function
initRoster
()
{
function
initRoster
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment