mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +01:00
Scroll sidebar in case if the channel is not in view
This commit is contained in:
parent
0ffaf41874
commit
17ded0a3bd
@ -663,6 +663,9 @@
|
||||
if (selected_channel != channel_id && guild_channels[channel_id] && guild_channels[channel_id].read) {
|
||||
if (animate_it) {
|
||||
$("#guild-btn").sideNav("show");
|
||||
if (!element_in_view($("#channel-"+channel_id), true)) {
|
||||
$("#guild-nav").animate({ scrollTop: $(document).height() }, "fast");
|
||||
}
|
||||
flashElement($("#channel-"+channel_id));
|
||||
setTimeout(function () {
|
||||
$("#guild-btn").sideNav("hide");
|
||||
|
Loading…
Reference in New Issue
Block a user