mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
Merge branch 'master' of gitlab.com:MrFry/qmining-page
This commit is contained in:
commit
37f72202bc
1 changed files with 9 additions and 1 deletions
|
@ -566,7 +566,14 @@ export default class Chat extends React.Component {
|
|||
} else if (type === 'img') {
|
||||
return (
|
||||
<a key={key} href={msg} rel="noreferrer" target="_blank">
|
||||
<img src={`${constants.apiUrl}${msg}`} />
|
||||
<img
|
||||
onLoad={() => {
|
||||
if (!this.state.skipBottomScroll) {
|
||||
this.scrollToChatBottom()
|
||||
}
|
||||
}}
|
||||
src={`${constants.apiUrl}${msg}`}
|
||||
/>
|
||||
</a>
|
||||
)
|
||||
} else if (type === 'file') {
|
||||
|
@ -604,6 +611,7 @@ export default class Chat extends React.Component {
|
|||
<div
|
||||
className={`${styles.loadMore} ${styles.loadMoreActive}`}
|
||||
onClick={() => {
|
||||
this.setState({ skipBottomScroll: true })
|
||||
this.socket.emit('get chat messages', {
|
||||
chatPartner: selectedUser,
|
||||
from: firstMessage.date,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue