mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-08 01:45:28 +00:00
fix: hide new message bar on jump to bottom
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user