Pref // Bind Options to User Data LMs.
This commit is contained in:
parent
47031715b0
commit
e68d02833d
|
@ -15,6 +15,7 @@
|
|||
#include "KeyValueBlobReader.h"
|
||||
#include "PhraseReplacementMap.h"
|
||||
#include "LMConsolidator.h"
|
||||
#include "vChewing-Swift.h"
|
||||
|
||||
namespace vChewing {
|
||||
|
||||
|
@ -39,9 +40,14 @@ bool PhraseReplacementMap::open(const char *path)
|
|||
if (data) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
LMConsolidator::FixEOF(path);
|
||||
LMConsolidator::ConsolidateContent(path, false);
|
||||
|
||||
if (Preferences.shouldAutoSortPhraseReplacementMapOnLoad) {
|
||||
LMConsolidator::ConsolidateContent(path, true);
|
||||
} else {
|
||||
LMConsolidator::ConsolidateContent(path, false);
|
||||
}
|
||||
|
||||
fd = ::open(path, O_RDONLY);
|
||||
if (fd == -1) {
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <syslog.h>
|
||||
#include "LMConsolidator.h"
|
||||
#include "KeyValueBlobReader.h"
|
||||
#include "vChewing-Swift.h"
|
||||
|
||||
namespace vChewing {
|
||||
|
||||
|
@ -39,7 +40,12 @@ bool UserPhrasesLM::open(const char *path)
|
|||
}
|
||||
|
||||
LMConsolidator::FixEOF(path);
|
||||
LMConsolidator::ConsolidateContent(path, false);
|
||||
|
||||
if (Preferences.ShouldAutoSortUserPhrasesAndExclListOnLoad) {
|
||||
LMConsolidator::ConsolidateContent(path, true);
|
||||
} else {
|
||||
LMConsolidator::ConsolidateContent(path, false);
|
||||
}
|
||||
|
||||
fd = ::open(path, O_RDONLY);
|
||||
if (fd == -1) {
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
|
||||
#import "InputMethodController.h"
|
||||
#include <objc/objc.h>
|
||||
#import <fstream>
|
||||
#import <iostream>
|
||||
#import <set>
|
||||
|
|
Loading…
Reference in New Issue