1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-14 23:26:58 +02:00

Desktop: UI update (#3586)

This commit is contained in:
Laurent
2020-09-15 14:01:07 +01:00
committed by GitHub
parent bdedf69439
commit 056285deda
138 changed files with 4620 additions and 2308 deletions

View File

@@ -10,7 +10,7 @@ class ModalDialog extends React.Component {
}
styles() {
const themeId = this.props.theme;
const themeId = this.props.themeId;
const theme = themeStyle(themeId);
if (this.styles_[themeId]) return this.styles_[themeId];

View File

@@ -63,7 +63,7 @@ class AppNavComponent extends Component {
this.previousRouteName_ = route.routeName;
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
const style = { flex: 1, backgroundColor: theme.backgroundColor };
@@ -81,7 +81,7 @@ class AppNavComponent extends Component {
const AppNav = connect(state => {
return {
route: state.route,
theme: state.settings.theme,
themeId: state.settings.theme,
};
})(AppNavComponent);

View File

@@ -44,7 +44,7 @@ class NoteBodyViewer extends Component {
this.forceUpdate_ = false;
const note = this.props.note;
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
const bodyToRender = note ? note.body : '';

View File

@@ -22,9 +22,9 @@ class NoteItemComponent extends Component {
}
styles() {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
if (this.styles_[this.props.theme]) return this.styles_[this.props.theme];
if (this.styles_[this.props.themeId]) return this.styles_[this.props.themeId];
this.styles_ = {};
const styles = {
@@ -62,8 +62,8 @@ class NoteItemComponent extends Component {
styles.selectionWrapperSelected = Object.assign({}, styles.selectionWrapper);
styles.selectionWrapperSelected.backgroundColor = theme.selectedColor;
this.styles_[this.props.theme] = StyleSheet.create(styles);
return this.styles_[this.props.theme];
this.styles_[this.props.themeId] = StyleSheet.create(styles);
return this.styles_[this.props.themeId];
}
async todoCheckbox_change(checked) {
@@ -107,7 +107,7 @@ class NoteItemComponent extends Component {
const note = this.props.note ? this.props.note : {};
const isTodo = !!Number(note.is_todo);
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
// IOS: display: none crashes the app
const checkboxStyle = !isTodo ? { display: 'none' } : { color: theme.color };
@@ -145,7 +145,7 @@ class NoteItemComponent extends Component {
const NoteItem = connect(state => {
return {
theme: state.settings.theme,
themeId: state.settings.theme,
noteSelectionEnabled: state.noteSelectionEnabled,
selectedNoteIds: state.selectedNoteIds,
};

View File

@@ -22,7 +22,7 @@ class NoteListComponent extends Component {
}
styles() {
const themeId = this.props.theme;
const themeId = this.props.themeId;
const theme = themeStyle(themeId);
if (this.styles_[themeId]) return this.styles_[themeId];
@@ -114,7 +114,7 @@ const NoteList = connect(state => {
items: state.notes,
folders: state.folders,
notesSource: state.notesSource,
theme: state.settings.theme,
themeId: state.settings.theme,
noteSelectionEnabled: state.noteSelectionEnabled,
};
})(NoteListComponent);

View File

@@ -532,7 +532,7 @@ const ScreenHeader = connect(state => {
historyCanGoBack: state.historyCanGoBack,
locale: state.settings.locale,
folders: state.folders,
theme: state.settings.theme,
themeId: state.settings.theme,
noteSelectionEnabled: state.noteSelectionEnabled,
selectedNoteIds: state.selectedNoteIds,
showMissingMasterKeyMessage: state.notLoadedMasterKeys.length && state.masterKeys.length,

View File

@@ -116,7 +116,7 @@ class NoteTagsDialogComponent extends React.Component {
}
styles() {
const themeId = this.props.theme;
const themeId = this.props.themeId;
const theme = themeStyle(themeId);
if (this.styles_[themeId]) return this.styles_[themeId];
@@ -155,7 +155,7 @@ class NoteTagsDialogComponent extends React.Component {
}
render() {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
const dialogContent = (
<View style={{ flex: 1 }}>
@@ -175,13 +175,13 @@ class NoteTagsDialogComponent extends React.Component {
</View>
);
return <ModalDialog theme={this.props.theme} ContentComponent={dialogContent} title={_('Type new tags or select from list')} onOkPress={this.okButton_press} onCancelPress={this.cancelButton_press} buttonBarEnabled={!this.state.savingTags} />;
return <ModalDialog themeId={this.props.themeId} ContentComponent={dialogContent} title={_('Type new tags or select from list')} onOkPress={this.okButton_press} onCancelPress={this.cancelButton_press} buttonBarEnabled={!this.state.savingTags} />;
}
}
const NoteTagsDialog = connect(state => {
return {
theme: state.settings.theme,
themeId: state.settings.theme,
tags: state.tags,
noteId: state.selectedNoteIds.length ? state.selectedNoteIds[0] : null,
};

View File

@@ -1,6 +1,6 @@
import * as React from 'react';
import { View, Text, ScrollView } from 'react-native';
import useSyncTargetUpgrade from 'lib/services/synchronizer/gui/useSyncTargetUpgrade';
const { View, Text, ScrollView } = require('react-native');
const { connect } = require('react-redux');
const { themeStyle } = require('lib/components/global-style.js');
@@ -10,7 +10,7 @@ const { _ } = require('lib/locale.js');
function UpgradeSyncTargetScreen(props:any) {
const upgradeResult = useSyncTargetUpgrade();
const theme = themeStyle(props.theme);
const theme = themeStyle(props.themeId);
const lineStyle = { ...theme.normalText, marginBottom: 20 };
const stackTraceStyle = { ...theme.normalText, flexWrap: 'nowrap', fontSize: theme.fontSize * 0.5, color: theme.colorFaded };
@@ -67,6 +67,6 @@ function UpgradeSyncTargetScreen(props:any) {
export default connect((state:any) => {
return {
theme: state.settings.theme,
themeId: state.settings.theme,
};
})(UpgradeSyncTargetScreen);

View File

@@ -154,7 +154,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
}
styles() {
const themeId = this.props.theme;
const themeId = this.props.themeId;
const theme = themeStyle(themeId);
if (this.styles_[themeId]) return this.styles_[themeId];
@@ -249,7 +249,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
}
renderHeader(key, title) {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
return (
<View key={key} style={this.styles().headerWrapperStyle}>
<Text style={theme.headerStyle}>{title}</Text>
@@ -327,7 +327,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
}
settingToComponent(key, value) {
const themeId = this.props.theme;
const themeId = this.props.themeId;
const theme = themeStyle(themeId);
const output = null;
@@ -429,7 +429,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
render() {
const settings = this.state.settings;
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
const settingComps = shared.settingsToComponents2(this, 'mobile', settings);
@@ -545,7 +545,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
);
return (
<View style={this.rootStyle(this.props.theme).root}>
<View style={this.rootStyle(this.props.themeId).root}>
<ScreenHeader title={_('Configuration')} showSaveButton={true} showSearchButton={false} showSideMenuButton={false} saveButtonDisabled={!this.state.changedSettingKeys.length} onSaveButtonPress={this.saveButton_press} />
<ScrollView>{settingComps}</ScrollView>
</View>
@@ -556,7 +556,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
const ConfigScreen = connect(state => {
return {
settings: state.settings,
theme: state.settings.theme,
themeId: state.settings.theme,
};
})(ConfigScreenComponent);

View File

@@ -24,7 +24,7 @@ class DropboxLoginScreenComponent extends BaseScreenComponent {
}
styles() {
const themeId = this.props.theme;
const themeId = this.props.themeId;
const theme = themeStyle(themeId);
if (this.styles_[themeId]) return this.styles_[themeId];
@@ -48,7 +48,7 @@ class DropboxLoginScreenComponent extends BaseScreenComponent {
}
render() {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
return (
<View style={this.styles().screen}>
@@ -83,7 +83,7 @@ class DropboxLoginScreenComponent extends BaseScreenComponent {
const DropboxLoginScreen = connect(state => {
return {
theme: state.settings.theme,
themeId: state.settings.theme,
};
})(DropboxLoginScreenComponent);

View File

@@ -57,7 +57,7 @@ class EncryptionConfigScreenComponent extends BaseScreenComponent {
}
styles() {
const themeId = this.props.theme;
const themeId = this.props.themeId;
const theme = themeStyle(themeId);
if (this.styles_[themeId]) return this.styles_[themeId];
@@ -97,7 +97,7 @@ class EncryptionConfigScreenComponent extends BaseScreenComponent {
}
renderMasterKey(num, mk) {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
const onSaveClick = () => {
return shared.onSavePasswordClick(this, mk);
@@ -129,7 +129,7 @@ class EncryptionConfigScreenComponent extends BaseScreenComponent {
}
passwordPromptComponent() {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
const onEnableClick = async () => {
try {
@@ -194,7 +194,7 @@ class EncryptionConfigScreenComponent extends BaseScreenComponent {
}
render() {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
const masterKeys = this.props.masterKeys;
const decryptedItemsInfo = this.props.encryptionEnabled ? <Text style={this.styles().normalText}>{shared.decryptedStatText(this)}</Text> : null;
@@ -260,7 +260,7 @@ class EncryptionConfigScreenComponent extends BaseScreenComponent {
) : null;
return (
<View style={this.rootStyle(this.props.theme).root}>
<View style={this.rootStyle(this.props.themeId).root}>
<ScreenHeader title={_('Encryption Config')} />
<ScrollView style={this.styles().container}>
{
@@ -297,7 +297,7 @@ class EncryptionConfigScreenComponent extends BaseScreenComponent {
const EncryptionConfigScreen = connect(state => {
return {
theme: state.settings.theme,
themeId: state.settings.theme,
masterKeys: state.masterKeys,
passwords: state.settings['encryption.passwordCache'],
encryptionEnabled: state.settings['encryption.enabled'],

View File

@@ -25,9 +25,9 @@ class FolderScreenComponent extends BaseScreenComponent {
}
styles() {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
if (this.styles_[this.props.theme]) return this.styles_[this.props.theme];
if (this.styles_[this.props.themeId]) return this.styles_[this.props.themeId];
this.styles_ = {};
const styles = {
@@ -38,8 +38,8 @@ class FolderScreenComponent extends BaseScreenComponent {
},
};
this.styles_[this.props.theme] = StyleSheet.create(styles);
return this.styles_[this.props.theme];
this.styles_[this.props.themeId] = StyleSheet.create(styles);
return this.styles_[this.props.themeId];
}
UNSAFE_componentWillMount() {
@@ -102,10 +102,10 @@ class FolderScreenComponent extends BaseScreenComponent {
render() {
const saveButtonDisabled = !this.isModified();
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
return (
<View style={this.rootStyle(this.props.theme).root}>
<View style={this.rootStyle(this.props.themeId).root}>
<ScreenHeader title={_('Edit notebook')} showSaveButton={true} saveButtonDisabled={saveButtonDisabled} onSaveButtonPress={() => this.saveFolderButton_press()} showSideMenuButton={false} showSearchButton={false} />
<TextInput placeholder={_('Enter notebook title')} placeholderTextColor={theme.colorFaded} underlineColorAndroid={theme.dividerColor} selectionColor={theme.textSelectionColor} keyboardAppearance={theme.keyboardAppearance} style={this.styles().textInput} autoFocus={true} value={this.state.folder.title} onChangeText={text => this.title_changeText(text)} />
<dialogs.DialogBox
@@ -121,7 +121,7 @@ class FolderScreenComponent extends BaseScreenComponent {
const FolderScreen = connect(state => {
return {
folderId: state.selectedFolderId,
theme: state.settings.theme,
themeId: state.settings.theme,
};
})(FolderScreenComponent);

View File

@@ -26,9 +26,9 @@ class LogScreenComponent extends BaseScreenComponent {
}
styles() {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
if (this.styles_[this.props.theme]) return this.styles_[this.props.theme];
if (this.styles_[this.props.themeId]) return this.styles_[this.props.themeId];
this.styles_ = {};
const styles = {
@@ -56,8 +56,8 @@ class LogScreenComponent extends BaseScreenComponent {
styles.rowTextWarn = Object.assign({}, styles.rowText);
styles.rowTextWarn.color = theme.colorWarn;
this.styles_[this.props.theme] = StyleSheet.create(styles);
return this.styles_[this.props.theme];
this.styles_[this.props.themeId] = StyleSheet.create(styles);
return this.styles_[this.props.themeId];
}
UNSAFE_componentWillMount() {
@@ -96,7 +96,7 @@ class LogScreenComponent extends BaseScreenComponent {
// `enableEmptySections` is to fix this warning: https://github.com/FaridSafi/react-native-gifted-listview/issues/39
return (
<View style={this.rootStyle(this.props.theme).root}>
<View style={this.rootStyle(this.props.themeId).root}>
<ScreenHeader title={_('Log')} />
<FlatList
data={this.state.logEntries}
@@ -128,7 +128,7 @@ class LogScreenComponent extends BaseScreenComponent {
const LogScreen = connect(state => {
return {
theme: state.settings.theme,
themeId: state.settings.theme,
};
})(LogScreenComponent);

View File

@@ -257,7 +257,7 @@ class NoteScreenComponent extends BaseScreenComponent {
}
styles() {
const themeId = this.props.theme;
const themeId = this.props.themeId;
const theme = themeStyle(themeId);
const cacheKey = [themeId, this.state.titleTextInputHeight, this.state.HACK_webviewLoadingState].join('_');
@@ -957,12 +957,12 @@ class NoteScreenComponent extends BaseScreenComponent {
);
}
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
const note = this.state.note;
const isTodo = !!Number(note.is_todo);
if (this.state.showCamera) {
return <CameraView theme={this.props.theme} style={{ flex: 1 }} onPhoto={this.cameraView_onPhoto} onCancel={this.cameraView_onCancel} />;
return <CameraView themeId={this.props.themeId} style={{ flex: 1 }} onPhoto={this.cameraView_onPhoto} onCancel={this.cameraView_onCancel} />;
}
let bodyComponent = null;
@@ -992,7 +992,7 @@ class NoteScreenComponent extends BaseScreenComponent {
note={note}
noteResources={this.state.noteResources}
highlightedKeywords={keywords}
theme={this.props.theme}
themeId={this.props.themeId}
noteHash={this.props.noteHash}
onCheckboxChange={newBody => {
onCheckboxChange(newBody);
@@ -1049,7 +1049,7 @@ class NoteScreenComponent extends BaseScreenComponent {
note: note,
noteResources: this.state.noteResources,
highlightedKeywords: keywords,
theme: this.props.theme,
themeId: this.props.themeId,
noteHash: this.props.noteHash,
onCheckboxChange: newBody => {
onCheckboxChange(newBody);
@@ -1153,7 +1153,7 @@ class NoteScreenComponent extends BaseScreenComponent {
const noteTagDialog = !this.state.noteTagDialogShown ? null : <NoteTagsDialog onCloseRequested={this.noteTagDialog_closeRequested} />;
return (
<View style={this.rootStyle(this.props.theme).root}>
<View style={this.rootStyle(this.props.themeId).root}>
<ScreenHeader
folderPickerOptions={this.folderPickerOptions()}
menuOptions={this.menuOptions()}
@@ -1193,7 +1193,7 @@ const NoteScreen = connect(state => {
itemType: state.selectedItemType,
folders: state.folders,
searchQuery: state.searchQuery,
theme: state.settings.theme,
themeId: state.settings.theme,
editorFont: [state.settings['style.editor.fontFamily']],
ftsEnabled: state.settings['db.ftsEnabled'],
sharedData: state.sharedData,

View File

@@ -81,7 +81,7 @@ class NotesScreenComponent extends BaseScreenComponent {
styles() {
if (!this.styles_) this.styles_ = {};
const themeId = this.props.theme;
const themeId = this.props.themeId;
const cacheKey = themeId;
if (this.styles_[cacheKey]) return this.styles_[cacheKey];
@@ -207,7 +207,7 @@ class NotesScreenComponent extends BaseScreenComponent {
render() {
const parent = this.parentItem();
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
const rootStyle = {
flex: 1,
@@ -263,7 +263,7 @@ const NotesScreen = connect(state => {
notesSource: state.notesSource,
uncompletedTodosOnTop: state.settings.uncompletedTodosOnTop,
showCompletedTodos: state.settings.showCompletedTodos,
theme: state.settings.theme,
themeId: state.settings.theme,
noteSelectionEnabled: state.noteSelectionEnabled,
notesOrder: stateUtils.notesOrder(state.settings),
};

View File

@@ -23,7 +23,7 @@ class OneDriveLoginScreenComponent extends BaseScreenComponent {
}
styles() {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
return {
screen: {
flex: 1,
@@ -129,7 +129,7 @@ class OneDriveLoginScreenComponent extends BaseScreenComponent {
const OneDriveLoginScreen = connect((state) => {
return {
theme: state.settings.theme,
themeId: state.settings.theme,
};
})(OneDriveLoginScreenComponent);

View File

@@ -30,9 +30,9 @@ class SearchScreenComponent extends BaseScreenComponent {
}
styles() {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
if (this.styles_[this.props.theme]) return this.styles_[this.props.theme];
if (this.styles_[this.props.themeId]) return this.styles_[this.props.themeId];
this.styles_ = {};
const styles = {
@@ -58,8 +58,8 @@ class SearchScreenComponent extends BaseScreenComponent {
styles.clearIcon.paddingRight = theme.marginRight;
styles.clearIcon.backgroundColor = theme.backgroundColor;
this.styles_[this.props.theme] = StyleSheet.create(styles);
return this.styles_[this.props.theme];
this.styles_[this.props.themeId] = StyleSheet.create(styles);
return this.styles_[this.props.themeId];
}
componentDidMount() {
@@ -144,7 +144,7 @@ class SearchScreenComponent extends BaseScreenComponent {
render() {
if (!this.isMounted_) return null;
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
const rootStyle = {
flex: 1,
@@ -203,7 +203,7 @@ class SearchScreenComponent extends BaseScreenComponent {
const SearchScreen = connect(state => {
return {
query: state.searchQuery,
theme: state.settings.theme,
themeId: state.settings.theme,
settings: state.settings,
noteSelectionEnabled: state.noteSelectionEnabled,
};

View File

@@ -32,7 +32,7 @@ class StatusScreenComponent extends BaseScreenComponent {
}
styles() {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
return {
body: {
flex: 1,
@@ -42,7 +42,7 @@ class StatusScreenComponent extends BaseScreenComponent {
}
render() {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
const renderBody = report => {
const baseStyle = {
@@ -138,7 +138,7 @@ class StatusScreenComponent extends BaseScreenComponent {
const body = renderBody(this.state.report);
return (
<View style={this.rootStyle(this.props.theme).root}>
<View style={this.rootStyle(this.props.themeId).root}>
<ScreenHeader title={_('Status')} />
<View style={this.styles().body}>{body}</View>
<Button title={_('Refresh')} onPress={() => this.resfreshScreen()} />
@@ -149,7 +149,7 @@ class StatusScreenComponent extends BaseScreenComponent {
const StatusScreen = connect(state => {
return {
theme: state.settings.theme,
themeId: state.settings.theme,
};
})(StatusScreenComponent);

View File

@@ -28,7 +28,7 @@ class TagsScreenComponent extends BaseScreenComponent {
styles() {
if (this.styles_) return this.styles_;
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
this.styles_ = StyleSheet.create({
listItem: {
@@ -89,7 +89,7 @@ class TagsScreenComponent extends BaseScreenComponent {
}
render() {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
const rootStyle = {
flex: 1,
@@ -107,7 +107,7 @@ class TagsScreenComponent extends BaseScreenComponent {
const TagsScreen = connect(state => {
return {
theme: state.settings.theme,
themeId: state.settings.theme,
};
})(TagsScreenComponent);

View File

@@ -15,9 +15,9 @@ class SideMenuContentNoteComponent extends Component {
}
styles() {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
if (this.styles_[this.props.theme]) return this.styles_[this.props.theme];
if (this.styles_[this.props.themeId]) return this.styles_[this.props.themeId];
this.styles_ = {};
const styles = {
@@ -45,12 +45,12 @@ class SideMenuContentNoteComponent extends Component {
styles.sideButton = Object.assign({}, styles.button, { flex: 0 });
styles.sideButtonDisabled = Object.assign({}, styles.sideButton, { opacity: 0.6 });
this.styles_[this.props.theme] = StyleSheet.create(styles);
return this.styles_[this.props.theme];
this.styles_[this.props.themeId] = StyleSheet.create(styles);
return this.styles_[this.props.themeId];
}
renderDivider(key) {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
return <View style={{ marginTop: 15, marginBottom: 15, flex: -1, borderBottomWidth: 1, borderBottomColor: theme.dividerColor }} key={key}></View>;
}
@@ -72,7 +72,7 @@ class SideMenuContentNoteComponent extends Component {
}
render() {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
const items = [];
@@ -109,7 +109,7 @@ class SideMenuContentNoteComponent extends Component {
const SideMenuContentNote = connect(state => {
return {
theme: state.settings.theme,
themeId: state.settings.theme,
};
})(SideMenuContentNoteComponent);

View File

@@ -35,9 +35,9 @@ class SideMenuContentComponent extends Component {
}
styles() {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
if (this.styles_[this.props.theme]) return this.styles_[this.props.theme];
if (this.styles_[this.props.themeId]) return this.styles_[this.props.themeId];
this.styles_ = {};
const styles = {
@@ -85,8 +85,8 @@ class SideMenuContentComponent extends Component {
styles.sideButtonSelected = Object.assign({}, styles.sideButton, { backgroundColor: theme.selectedColor });
styles.sideButtonText = Object.assign({}, styles.buttonText);
this.styles_[this.props.theme] = StyleSheet.create(styles);
return this.styles_[this.props.theme];
this.styles_[this.props.themeId] = StyleSheet.create(styles);
return this.styles_[this.props.themeId];
}
componentDidUpdate(prevProps) {
@@ -220,7 +220,7 @@ class SideMenuContentComponent extends Component {
}
renderFolderItem(folder, selected, hasChildren, depth) {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
const folderButtonStyle = {
flex: 1,
@@ -298,12 +298,12 @@ class SideMenuContentComponent extends Component {
}
makeDivider(key) {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
return <View style={{ marginTop: 15, marginBottom: 15, flex: -1, borderBottomWidth: 1, borderBottomColor: theme.dividerColor }} key={key}></View>;
}
renderBottomPanel() {
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
const items = [];
@@ -351,7 +351,7 @@ class SideMenuContentComponent extends Component {
render() {
let items = [];
const theme = themeStyle(this.props.theme);
const theme = themeStyle(this.props.themeId);
// HACK: inner height of ScrollView doesn't appear to be calculated correctly when
// using padding. So instead creating blank elements for padding bottom and top.
@@ -398,7 +398,7 @@ const SideMenuContent = connect(state => {
selectedTagId: state.selectedTagId,
notesParentType: state.notesParentType,
locale: state.settings.locale,
theme: state.settings.theme,
themeId: state.settings.theme,
// Don't do the opacity animation as it means re-rendering the list multiple times
// opacity: state.sideMenuOpenPercent,
collapsedFolderIds: state.collapsedFolderIds,