mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
hide messageCard when there is no message to show on tablet
This commit is contained in:
@@ -39,7 +39,7 @@ const SimpleList = ({
|
|||||||
},
|
},
|
||||||
}) => {
|
}) => {
|
||||||
const [state] = useTracked();
|
const [state] = useTracked();
|
||||||
const {colors, deviceMode} = state;
|
const {colors, deviceMode, messageBoardState} = state;
|
||||||
const [_loading, setLoading] = useState(true);
|
const [_loading, setLoading] = useState(true);
|
||||||
const [dataProvider, setDataProvider] = useState(
|
const [dataProvider, setDataProvider] = useState(
|
||||||
new DataProvider((r1, r2) => {
|
new DataProvider((r1, r2) => {
|
||||||
@@ -67,7 +67,6 @@ const SimpleList = ({
|
|||||||
setLoading(false);
|
setLoading(false);
|
||||||
}, [listData, deviceMode]);
|
}, [listData, deviceMode]);
|
||||||
|
|
||||||
|
|
||||||
const _onRefresh = async () => {
|
const _onRefresh = async () => {
|
||||||
await Sync.run();
|
await Sync.run();
|
||||||
if (refreshCallback) {
|
if (refreshCallback) {
|
||||||
@@ -86,7 +85,6 @@ const SimpleList = ({
|
|||||||
return emptyData.getDataForIndex(index).type;
|
return emptyData.getDataForIndex(index).type;
|
||||||
},
|
},
|
||||||
(type, dim) => {
|
(type, dim) => {
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'empty':
|
case 'empty':
|
||||||
dim.width = width;
|
dim.width = width;
|
||||||
@@ -141,7 +139,13 @@ const SimpleList = ({
|
|||||||
case 'MAIN_HEADER':
|
case 'MAIN_HEADER':
|
||||||
dim.width = width;
|
dim.width = width;
|
||||||
dim.height =
|
dim.height =
|
||||||
dataType === 'search' ? 0 : DDS.isLargeTablet() ? 50 : 195;
|
dataType === 'search'
|
||||||
|
? 0
|
||||||
|
: DDS.isLargeTablet()
|
||||||
|
? messageBoardState.visible
|
||||||
|
? 50
|
||||||
|
: 0
|
||||||
|
: 195;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dim.width = width;
|
dim.width = width;
|
||||||
|
|||||||
Reference in New Issue
Block a user