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
8b459c68
Commit
8b459c68
authored
Mar 09, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Call trimChats in the show method of the box view
Not in the onAdded handler.
parent
d192b349
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
7 deletions
+3
-7
src/converse-controlbox.js
src/converse-controlbox.js
+1
-1
src/converse-core.js
src/converse-core.js
+2
-5
src/converse-muc.js
src/converse-muc.js
+0
-1
No files found.
src/converse-controlbox.js
View file @
8b459c68
...
@@ -85,7 +85,6 @@
...
@@ -85,7 +85,6 @@
if
(
!
view
&&
item
.
get
(
'
box_id
'
)
===
'
controlbox
'
)
{
if
(
!
view
&&
item
.
get
(
'
box_id
'
)
===
'
controlbox
'
)
{
view
=
new
converse
.
ControlBoxView
({
model
:
item
});
view
=
new
converse
.
ControlBoxView
({
model
:
item
});
this
.
add
(
item
.
get
(
'
id
'
),
view
);
this
.
add
(
item
.
get
(
'
id
'
),
view
);
this
.
trimChats
(
view
);
}
else
{
}
else
{
this
.
_super
.
onChatBoxAdded
.
apply
(
this
,
arguments
);
this
.
_super
.
onChatBoxAdded
.
apply
(
this
,
arguments
);
}
}
...
@@ -351,6 +350,7 @@
...
@@ -351,6 +350,7 @@
show
:
function
()
{
show
:
function
()
{
converse
.
controlboxtoggle
.
hide
(
function
()
{
converse
.
controlboxtoggle
.
hide
(
function
()
{
converse
.
chatboxviews
.
trimChats
(
this
);
this
.
$el
.
show
(
'
fast
'
,
function
()
{
this
.
$el
.
show
(
'
fast
'
,
function
()
{
if
(
converse
.
rosterview
)
{
if
(
converse
.
rosterview
)
{
converse
.
rosterview
.
update
();
converse
.
rosterview
.
update
();
...
...
src/converse-core.js
View file @
8b459c68
...
@@ -2261,18 +2261,16 @@
...
@@ -2261,18 +2261,16 @@
this
.
debouncedShow
=
_
.
debounce
(
function
(
focus
)
{
this
.
debouncedShow
=
_
.
debounce
(
function
(
focus
)
{
if
(
this
.
$el
.
is
(
'
:visible
'
)
&&
this
.
$el
.
css
(
'
opacity
'
)
===
"
1
"
)
{
if
(
this
.
$el
.
is
(
'
:visible
'
)
&&
this
.
$el
.
css
(
'
opacity
'
)
===
"
1
"
)
{
if
(
focus
)
{
this
.
focus
();
}
if
(
focus
)
{
this
.
focus
();
}
return
this
;
return
;
}
}
this
.
initDragResize
().
setDimensions
();
this
.
initDragResize
().
setDimensions
();
// We call trimChats before fading in, to avoid ugly transition
// effects.
converse
.
chatboxviews
.
trimChats
(
this
);
this
.
$el
.
fadeIn
(
function
()
{
this
.
$el
.
fadeIn
(
function
()
{
if
(
converse
.
connection
.
connected
)
{
if
(
converse
.
connection
.
connected
)
{
// Without a connection, we haven't yet initialized
// Without a connection, we haven't yet initialized
// localstorage
// localstorage
this
.
model
.
save
();
this
.
model
.
save
();
}
}
converse
.
chatboxviews
.
trimChats
(
this
);
this
.
setChatState
(
converse
.
ACTIVE
);
this
.
setChatState
(
converse
.
ACTIVE
);
this
.
scrollDown
();
this
.
scrollDown
();
if
(
focus
)
{
if
(
focus
)
{
...
@@ -2452,7 +2450,6 @@
...
@@ -2452,7 +2450,6 @@
view
.
model
=
item
;
view
.
model
=
item
;
view
.
initialize
();
view
.
initialize
();
}
}
this
.
trimChats
(
view
);
},
},
getChatBoxWidth
:
function
(
view
)
{
getChatBoxWidth
:
function
(
view
)
{
...
...
src/converse-muc.js
View file @
8b459c68
...
@@ -189,7 +189,6 @@
...
@@ -189,7 +189,6 @@
if
(
!
view
&&
item
.
get
(
'
chatroom
'
))
{
if
(
!
view
&&
item
.
get
(
'
chatroom
'
))
{
view
=
new
converse
.
ChatRoomView
({
'
model
'
:
item
});
view
=
new
converse
.
ChatRoomView
({
'
model
'
:
item
});
this
.
add
(
item
.
get
(
'
id
'
),
view
);
this
.
add
(
item
.
get
(
'
id
'
),
view
);
this
.
trimChats
(
view
);
}
else
{
}
else
{
this
.
_super
.
onChatBoxAdded
.
apply
(
this
,
arguments
);
this
.
_super
.
onChatBoxAdded
.
apply
(
this
,
arguments
);
}
}
...
...
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