fix: hide new message bar on jump to bottom

This commit is contained in:
Paul 2021-12-25 14:49:31 +00:00
parent de1b947b7d
commit b955f2820c

View file

@ -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>