mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 12:39:17 +00:00
fix issue seen in safari where topic list bounces
This commit is contained in:
parent
1608d20255
commit
5e5b3ab5d4
@ -31,6 +31,7 @@ export const AccountItemWrapper = styled.div`
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
color: #cccccc;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.active {
|
||||
|
@ -125,7 +125,7 @@ export function useChannels() {
|
||||
subject = names.join(", ");
|
||||
}
|
||||
if (!subject && !chan.contacts?.length) {
|
||||
subject = "notes";
|
||||
subject = "Notes";
|
||||
}
|
||||
|
||||
chan.subject = subject;
|
||||
|
@ -85,7 +85,7 @@ export function useConversation(cardId, channelId) {
|
||||
if (chan) {
|
||||
if (!chan.contacts?.length) {
|
||||
image = 'solution';
|
||||
subject = 'Private';
|
||||
subject = 'Notes';
|
||||
}
|
||||
else if (chan.contacts.length > 1) {
|
||||
image = 'appstore'
|
||||
|
@ -90,7 +90,7 @@ export function VirtualList({ id, items, itemRenderer, loadMore }) {
|
||||
};
|
||||
|
||||
const latchSlots = () => {
|
||||
if (containers.current.length > 0 && latched.current) {
|
||||
if (containers.current.length > 0 && latched.current && state.listHeight > 0) {
|
||||
if (!nolatch.current) {
|
||||
const last = containers.current[containers.current.length - 1];
|
||||
const bottom = last.top + last.height;
|
||||
@ -172,6 +172,10 @@ export function VirtualList({ id, items, itemRenderer, loadMore }) {
|
||||
|
||||
const loadSlots = () => {
|
||||
|
||||
if (state.listHeight == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (containers.current.length === 0) {
|
||||
// add the first slot
|
||||
if (itemView.current.length > 0) {
|
||||
|
@ -4,7 +4,7 @@ export function useVirtualList(id) {
|
||||
|
||||
const [state, setState] = useState({
|
||||
view: null,
|
||||
listHeight: 128,
|
||||
listHeight: 0,
|
||||
slots: [],
|
||||
});
|
||||
|
||||
|
@ -50,7 +50,7 @@ export function useDetails(cardId, channelId) {
|
||||
if (chan) {
|
||||
if (chan.contacts?.length === 0) {
|
||||
img = 'solution';
|
||||
subject = 'Private';
|
||||
subject = 'Notes';
|
||||
}
|
||||
else if (chan.contacts?.length > 1) {
|
||||
img = 'appstore'
|
||||
@ -58,7 +58,7 @@ export function useDetails(cardId, channelId) {
|
||||
}
|
||||
else {
|
||||
img = 'team';
|
||||
subject = 'Direct'
|
||||
subject = 'Conversation'
|
||||
}
|
||||
const parsed = JSON.parse(chan.data.channelDetail.data);
|
||||
if (parsed.subject) {
|
||||
|
Loading…
Reference in New Issue
Block a user