[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:
Ruihao Huang
2025-02-18 07:45:16 +00:00
committed by Hiroyuki Komatsu
parent f8fe1c177d
commit 22bca1ed10
2 changed files with 6 additions and 0 deletions

View File

@@ -502,6 +502,7 @@ mozc_cc_library(
],
deps = [
":candidate_list",
"//base:port",
"//base:text_normalizer",
"//base:util",
"//base:version",

View File

@@ -44,6 +44,7 @@
#include "absl/strings/str_split.h"
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "base/port.h"
#include "base/strings/assign.h"
#include "base/text_normalizer.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();
if (TargetIsAndroid()) {
usages->set_delay(1000);
}
using IndexInfoPair = std::pair<int32_t, commands::Information *>;
absl::flat_hash_map<int32_t, IndexInfoPair> usageid_information_map;
// Store usages.