mirror of
https://github.com/mii443/mozc.git
synced 2025-12-07 13:18:23 +00:00
[Japanese Usage Dictionary] Set the delay to show the floating usage dictionary window to 1000ms (1s) only for Android.
PiperOrigin-RevId: 728071129
This commit is contained in:
committed by
Hiroyuki Komatsu
parent
f8fe1c177d
commit
22bca1ed10
@@ -502,6 +502,7 @@ mozc_cc_library(
|
|||||||
],
|
],
|
||||||
deps = [
|
deps = [
|
||||||
":candidate_list",
|
":candidate_list",
|
||||||
|
"//base:port",
|
||||||
"//base:text_normalizer",
|
"//base:text_normalizer",
|
||||||
"//base:util",
|
"//base:util",
|
||||||
"//base:version",
|
"//base:version",
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
#include "absl/strings/str_split.h"
|
#include "absl/strings/str_split.h"
|
||||||
#include "absl/strings/string_view.h"
|
#include "absl/strings/string_view.h"
|
||||||
#include "absl/types/span.h"
|
#include "absl/types/span.h"
|
||||||
|
#include "base/port.h"
|
||||||
#include "base/strings/assign.h"
|
#include "base/strings/assign.h"
|
||||||
#include "base/text_normalizer.h"
|
#include "base/text_normalizer.h"
|
||||||
#include "base/util.h"
|
#include "base/util.h"
|
||||||
@@ -276,6 +277,10 @@ void FillUsages(const Segment &segment, const CandidateList &cand_list,
|
|||||||
|
|
||||||
commands::InformationList *usages = candidate_window_proto->mutable_usages();
|
commands::InformationList *usages = candidate_window_proto->mutable_usages();
|
||||||
|
|
||||||
|
if (TargetIsAndroid()) {
|
||||||
|
usages->set_delay(1000);
|
||||||
|
}
|
||||||
|
|
||||||
using IndexInfoPair = std::pair<int32_t, commands::Information *>;
|
using IndexInfoPair = std::pair<int32_t, commands::Information *>;
|
||||||
absl::flat_hash_map<int32_t, IndexInfoPair> usageid_information_map;
|
absl::flat_hash_map<int32_t, IndexInfoPair> usageid_information_map;
|
||||||
// Store usages.
|
// Store usages.
|
||||||
|
|||||||
Reference in New Issue
Block a user