mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +01:00
refactor selection system
This commit is contained in:
@@ -13,11 +13,11 @@ import {TEMPLATE_DELETE} from '../DialogManager/templates';
|
|||||||
export const SelectionHeader = () => {
|
export const SelectionHeader = () => {
|
||||||
// State
|
// State
|
||||||
const [state, dispatch] = useTracked();
|
const [state, dispatch] = useTracked();
|
||||||
const {colors, selectionMode, selectedItemsList, currentScreen} = state;
|
const {colors, selectionMode, selectedItemsList, currentScreen,containerState} = state;
|
||||||
const [selectAll, setSelectAll] = useState(false);
|
const [selectAll, setSelectAll] = useState(false);
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (containerState.noSelectionHeader ? null :
|
||||||
<Animatable.View
|
<Animatable.View
|
||||||
transition={['translateY']}
|
transition={['translateY']}
|
||||||
duration={300}
|
duration={300}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ const SelectionWrapper = ({
|
|||||||
? 30
|
? 30
|
||||||
: 0,
|
: 0,
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
currentEditingNote === item.dateCreated
|
currentEditingNote === item.dateCreated || pinned
|
||||||
? colors.shade
|
? colors.shade
|
||||||
: background
|
: background
|
||||||
? background
|
? background
|
||||||
|
|||||||
Reference in New Issue
Block a user