mirror of https://github.com/vector-im/riot-web
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/fix/19067
commit
0056b282a6
|
@ -48,7 +48,7 @@ Code should be committed as follows:
|
||||||
* CSS: https://github.com/matrix-org/matrix-react-sdk/tree/master/res/css
|
* CSS: https://github.com/matrix-org/matrix-react-sdk/tree/master/res/css
|
||||||
* Theme specific CSS & resources: https://github.com/matrix-org/matrix-react-sdk/tree/master/res/themes
|
* Theme specific CSS & resources: https://github.com/matrix-org/matrix-react-sdk/tree/master/res/themes
|
||||||
|
|
||||||
React components in matrix-react-sdk are come in two different flavours:
|
React components in matrix-react-sdk come in two different flavours:
|
||||||
'structures' and 'views'. Structures are stateful components which handle the
|
'structures' and 'views'. Structures are stateful components which handle the
|
||||||
more complicated business logic of the app, delegating their actual presentation
|
more complicated business logic of the app, delegating their actual presentation
|
||||||
rendering to stateless 'view' components. For instance, the RoomView component
|
rendering to stateless 'view' components. For instance, the RoomView component
|
||||||
|
|
|
@ -277,8 +277,15 @@ export default class ScrollPanel extends React.Component<IProps> {
|
||||||
// fractional values (both too big and too small)
|
// fractional values (both too big and too small)
|
||||||
// for scrollTop happen on certain browsers/platforms
|
// for scrollTop happen on certain browsers/platforms
|
||||||
// when scrolled all the way down. E.g. Chrome 72 on debian.
|
// when scrolled all the way down. E.g. Chrome 72 on debian.
|
||||||
// so check difference <= 1;
|
//
|
||||||
return Math.abs(sn.scrollHeight - (sn.scrollTop + sn.clientHeight)) <= 1;
|
// We therefore leave a bit of wiggle-room and assume we're at the
|
||||||
|
// bottom if the unscrolled area is less than one pixel high.
|
||||||
|
//
|
||||||
|
// non-standard DPI settings also seem to have effect here and can
|
||||||
|
// actually lead to scrollTop+clientHeight being *larger* than
|
||||||
|
// scrollHeight. (observed in element-desktop on Ubuntu 20.04)
|
||||||
|
//
|
||||||
|
return sn.scrollHeight - (sn.scrollTop + sn.clientHeight) <= 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
// returns the vertical height in the given direction that can be removed from
|
// returns the vertical height in the given direction that can be removed from
|
||||||
|
|
|
@ -528,7 +528,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
||||||
|
|
||||||
// Update NotificationStates
|
// Update NotificationStates
|
||||||
this.getNotificationState(s).setRooms(visibleRooms.filter(room => {
|
this.getNotificationState(s).setRooms(visibleRooms.filter(room => {
|
||||||
if (!roomIds.has(room.roomId)) return false;
|
if (!roomIds.has(room.roomId) || room.isSpaceRoom()) return false;
|
||||||
|
|
||||||
if (DMRoomMap.shared().getUserIdForRoomId(room.roomId)) {
|
if (DMRoomMap.shared().getUserIdForRoomId(room.roomId)) {
|
||||||
return s === HOME_SPACE;
|
return s === HOME_SPACE;
|
||||||
|
|
Loading…
Reference in New Issue