mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
fix items showing incorrectly in Trash
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Dimensions, Text, View } from 'react-native';
|
import {Dimensions, Text, View} from 'react-native';
|
||||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||||
import { ActionIcon } from '../ActionIcon';
|
import {ActionIcon} from '../ActionIcon';
|
||||||
import { ActionSheetEvent } from '../DialogManager/recievers';
|
import {ActionSheetEvent} from '../DialogManager/recievers';
|
||||||
import {timeSince} from "../../utils/TimeUtils";
|
import {timeSince} from '../../utils/TimeUtils';
|
||||||
import {ph, SIZE, WEIGHT} from "../../utils/SizeUtils";
|
import {ph, SIZE, WEIGHT} from '../../utils/SizeUtils';
|
||||||
|
|
||||||
const w = Dimensions.get('window').width;
|
const w = Dimensions.get('window').width;
|
||||||
const h = Dimensions.get('window').height;
|
const h = Dimensions.get('window').height;
|
||||||
@@ -170,17 +170,6 @@ export default class NoteItem extends React.Component {
|
|||||||
|
|
||||||
{isTrash ? (
|
{isTrash ? (
|
||||||
<>
|
<>
|
||||||
<Text
|
|
||||||
style={{
|
|
||||||
color: colors.icon,
|
|
||||||
fontSize: SIZE.xs - 1,
|
|
||||||
textAlignVertical: 'center',
|
|
||||||
fontFamily: WEIGHT.regular,
|
|
||||||
}}>
|
|
||||||
{'Deleted on: ' + item && item.dateDeleted
|
|
||||||
? new Date(item.dateDeleted).toISOString().slice(0, 10)
|
|
||||||
: null + ' '}
|
|
||||||
</Text>
|
|
||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
color: colors.accent,
|
color: colors.accent,
|
||||||
@@ -188,7 +177,21 @@ export default class NoteItem extends React.Component {
|
|||||||
textAlignVertical: 'center',
|
textAlignVertical: 'center',
|
||||||
fontFamily: WEIGHT.regular,
|
fontFamily: WEIGHT.regular,
|
||||||
}}>
|
}}>
|
||||||
{item.type[0].toUpperCase() + item.type.slice(1) + ' '}
|
{item.itemType[0].toUpperCase() +
|
||||||
|
item.itemType.slice(1) +
|
||||||
|
' '}
|
||||||
|
</Text>
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
color: colors.icon,
|
||||||
|
fontSize: SIZE.xs - 1,
|
||||||
|
textAlignVertical: 'center',
|
||||||
|
fontFamily: WEIGHT.regular,
|
||||||
|
}}>
|
||||||
|
Deleted on{' '}
|
||||||
|
{item && item.dateDeleted
|
||||||
|
? new Date(item.dateDeleted).toISOString().slice(0, 10)
|
||||||
|
: null + ' '}
|
||||||
</Text>
|
</Text>
|
||||||
</>
|
</>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
@@ -147,6 +147,10 @@ const SimpleList = ({
|
|||||||
dim.width = width;
|
dim.width = width;
|
||||||
dim.height = 110 * fontScale;
|
dim.height = 110 * fontScale;
|
||||||
break;
|
break;
|
||||||
|
case 'trash':
|
||||||
|
dim.width = width;
|
||||||
|
dim.height = 110 * fontScale;
|
||||||
|
break;
|
||||||
case 'topic':
|
case 'topic':
|
||||||
dim.width = width;
|
dim.width = width;
|
||||||
dim.height = 80 * fontScale;
|
dim.height = 80 * fontScale;
|
||||||
@@ -174,6 +178,7 @@ const SimpleList = ({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const _renderRow = (type, data, index) => {
|
const _renderRow = (type, data, index) => {
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'note':
|
case 'note':
|
||||||
return <RenderItem item={data} pinned={data.pinned} index={index} />;
|
return <RenderItem item={data} pinned={data.pinned} index={index} />;
|
||||||
|
|||||||
Reference in New Issue
Block a user