mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-10 01:03:36 -05:00
fix: hide new message bar on jump to bottom
This commit is contained in:
parent
de1b947b7d
commit
b955f2820c
1 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,7 @@ import styled, { css } from "styled-components";
|
||||||
|
|
||||||
import { Text } from "preact-i18n";
|
import { Text } from "preact-i18n";
|
||||||
|
|
||||||
|
import { internalEmit } from "../../../../lib/eventEmitter";
|
||||||
import { isTouchscreenDevice } from "../../../../lib/isTouchscreenDevice";
|
import { isTouchscreenDevice } from "../../../../lib/isTouchscreenDevice";
|
||||||
import { getRenderer } from "../../../../lib/renderer/Singleton";
|
import { getRenderer } from "../../../../lib/renderer/Singleton";
|
||||||
|
|
||||||
|
@ -88,7 +89,11 @@ export default observer(({ channel }: { channel: Channel }) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Bar position="bottom">
|
<Bar position="bottom">
|
||||||
<div onClick={() => renderer.jumpToBottom(true)}>
|
<div
|
||||||
|
onClick={() => {
|
||||||
|
renderer.jumpToBottom(true);
|
||||||
|
internalEmit("NewMessages", "hide");
|
||||||
|
}}>
|
||||||
<div>
|
<div>
|
||||||
<Text id="app.main.channel.misc.viewing_old" />
|
<Text id="app.main.channel.misc.viewing_old" />
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue