Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
trazyn committed Jul 25, 2018
1 parent 961b18e commit 9a9851a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/js/pages/Home/ChatContent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ import { on, off } from 'utils/event';
showAddFriend: (user) => stores.addfriend.toggle(true, user),
recallMessage: stores.chat.recallMessage,
downloads: stores.settings.downloads,
remeberConversation: stores.settings.remeberConversation,
rememberConversation: stores.settings.rememberConversation,
showConversation: stores.chat.showConversation,
toggleConversation: stores.chat.toggleConversation,
}))
Expand Down Expand Up @@ -544,7 +544,7 @@ export default class ChatContent extends Component {
}

componentWillUnmount() {
!this.props.remeberConversation && this.props.reset();
!this.props.rememberConversation && this.props.reset();
}

componentDidUpdate() {
Expand Down
18 changes: 9 additions & 9 deletions src/js/pages/Settings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import helper from 'utils/helper';
setConfirmImagePaste: stores.settings.setConfirmImagePaste,
blockRecall: stores.settings.blockRecall,
setBlockRecall: stores.settings.setBlockRecall,
remeberConversation: stores.settings.remeberConversation,
setRemeberConversation: stores.settings.setRemeberConversation,
rememberConversation: stores.settings.rememberConversation,
setRememberConversation: stores.settings.setRememberConversation,
showRedIcon: stores.settings.showRedIcon,
setShowRedIcon: stores.settings.setShowRedIcon,

Expand Down Expand Up @@ -56,8 +56,8 @@ export default class Settings extends Component {
setConfirmImagePaste,
blockRecall,
setBlockRecall,
remeberConversation,
setRemeberConversation,
rememberConversation,
setRememberConversation,
showRedIcon,
setShowRedIcon,
user,
Expand Down Expand Up @@ -131,12 +131,12 @@ export default class Settings extends Component {
</li>

<li>
<label htmlFor="remeberConversation">
<span>Remeber the last Conversation</span>
<label htmlFor="rememberConversation">
<span>Remember the last Conversation</span>
<Switch
checked={remeberConversation}
id="remeberConversation"
onChange={e => setRemeberConversation(e.target.checked)} />
checked={rememberConversation}
id="rememberConversation"
onChange={e => setRememberConversation(e.target.checked)} />
</label>
</li>

Expand Down
18 changes: 9 additions & 9 deletions src/js/stores/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Settings {
@observable confirmImagePaste = true;
@observable startup = false;
@observable blockRecall = false;
@observable remeberConversation = false;
@observable rememberConversation = false;
@observable showRedIcon = true;
@observable downloads = '';

Expand All @@ -26,8 +26,8 @@ class Settings {
self.save();
}

@action setRemeberConversation(remeberConversation) {
self.remeberConversation = remeberConversation;
@action setRememberConversation(rememberConversation) {
self.rememberConversation = rememberConversation;
self.save();
}

Expand Down Expand Up @@ -63,7 +63,7 @@ class Settings {

@action async init() {
var settings = await storage.get('settings');
var { alwaysOnTop, showOnTray, showNotification, blockRecall, remeberConversation, showRedIcon, startup, downloads } = self;
var { alwaysOnTop, showOnTray, showNotification, blockRecall, rememberConversation, showRedIcon, startup, downloads } = self;

if (settings && Object.keys(settings).length) {
// Use !! force convert to a bool value
Expand All @@ -73,7 +73,7 @@ class Settings {
self.confirmImagePaste = !!settings.confirmImagePaste;
self.startup = !!settings.startup;
self.blockRecall = !!settings.blockRecall;
self.remeberConversation = !!settings.remeberConversation;
self.rememberConversation = !!settings.rememberConversation;
self.showRedIcon = !!settings.showRedIcon;
self.downloads = settings.downloads;
} else {
Expand All @@ -84,7 +84,7 @@ class Settings {
startup,
downloads,
blockRecall,
remeberConversation,
rememberConversation,
showRedIcon,
});
}
Expand All @@ -104,7 +104,7 @@ class Settings {
}

save() {
var { alwaysOnTop, showOnTray, showNotification, confirmImagePaste, blockRecall, remeberConversation, showRedIcon, startup, downloads } = self;
var { alwaysOnTop, showOnTray, showNotification, confirmImagePaste, blockRecall, rememberConversation, showRedIcon, startup, downloads } = self;

storage.set('settings', {
alwaysOnTop,
Expand All @@ -114,7 +114,7 @@ class Settings {
startup,
downloads,
blockRecall,
remeberConversation,
rememberConversation,
showRedIcon,
});

Expand All @@ -127,7 +127,7 @@ class Settings {
startup,
downloads,
blockRecall,
remeberConversation,
rememberConversation,
showRedIcon,
}
});
Expand Down

0 comments on commit 9a9851a

Please sign in to comment.