Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ android {
applicationId "com.kazumaproject.markdownhelperkeyboard"
minSdk 24
targetSdk 36
versionCode 779
versionName "1.7.86"
versionCode 780
versionName "1.7.87"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ data class CandidateStripPresentation(
val resetCandidateTabSelection: Boolean,
val showIndependentShortcutToolbar: Boolean,
val reserveIndependentShortcutToolbarSpace: Boolean,
val showIntegratedShortcut: Boolean
val showIntegratedShortcutItems: Boolean,
val showIntegratedShortcutEntry: Boolean
)

object CandidateStripPresentationPolicy {
Expand Down Expand Up @@ -49,8 +50,10 @@ object CandidateStripPresentationPolicy {
shortcutPresentation.showIndependentToolbar && !hideShortcutForCandidates,
reserveIndependentShortcutToolbarSpace =
shortcutPresentation.showIndependentToolbar && hideShortcutForCandidates,
showIntegratedShortcut =
shortcutPresentation.showIntegratedShortcuts && !hideShortcutForCandidates
showIntegratedShortcutItems =
shortcutPresentation.showIntegratedShortcutItems && !hideShortcutForCandidates,
showIntegratedShortcutEntry =
shortcutPresentation.showIntegratedShortcutEntry && !hideShortcutForCandidates
)
}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ data class ImePreferencesSnapshot(
val isOmissionSearchEnable: Boolean,
val delayTime: Int,
val isLearnDictionaryMode: Boolean,
val incognitoModeDetectionPreference: Boolean,
val showLearnedCandidatesInIncognitoPreference: Boolean,
val isUserDictionaryEnable: Boolean,
val isUserTemplateEnable: Boolean,
val hankakuPreference: Boolean,
Expand Down Expand Up @@ -265,6 +267,10 @@ data class ImePreferencesSnapshot(
isOmissionSearchEnable = appPreference.omission_search_preference ?: false,
delayTime = appPreference.time_same_pronounce_typing_preference ?: 1000,
isLearnDictionaryMode = appPreference.learn_dictionary_preference ?: true,
incognitoModeDetectionPreference =
appPreference.incognito_mode_detection_preference,
showLearnedCandidatesInIncognitoPreference =
appPreference.show_learned_candidates_in_incognito_preference,
isUserDictionaryEnable = appPreference.user_dictionary_preference ?: true,
isUserTemplateEnable = appPreference.user_template_preference ?: true,
hankakuPreference = appPreference.space_hankaku_preference ?: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ data class ShortcutToolbarPresentationState(

data class ShortcutToolbarPresentation(
val showIndependentToolbar: Boolean,
val showIntegratedShortcuts: Boolean
val showIntegratedShortcutItems: Boolean,
val showIntegratedShortcutEntry: Boolean
)

object ShortcutToolbarPresentationPolicy {
Expand All @@ -23,25 +24,35 @@ object ShortcutToolbarPresentationPolicy {
if (!state.shortcutToolbarVisible || state.symbolKeyboardShown) {
return ShortcutToolbarPresentation(
showIndependentToolbar = false,
showIntegratedShortcuts = false
showIntegratedShortcutItems = false,
showIntegratedShortcutEntry = false
)
}
if (!state.integratedInSuggestion) {
return ShortcutToolbarPresentation(
showIndependentToolbar = true,
showIntegratedShortcuts = false
showIntegratedShortcutItems = false,
showIntegratedShortcutEntry = false
)
}
val showIntegratedShortcuts =
val showIntegratedShortcutItems =
state.inputStringEmpty &&
state.tailEmpty &&
!state.clipboardPreviewShown &&
!state.selectedTextGemmaActionsShown &&
state.suggestionsEmpty &&
!state.customLayoutPickerShown
val isCentralSpecialContentShown =
state.clipboardPreviewShown || state.selectedTextGemmaActionsShown
val showIntegratedShortcutEntry =
state.inputStringEmpty &&
state.tailEmpty &&
isCentralSpecialContentShown &&
!state.customLayoutPickerShown
return ShortcutToolbarPresentation(
showIndependentToolbar = false,
showIntegratedShortcuts = showIntegratedShortcuts
showIntegratedShortcutItems = showIntegratedShortcutItems,
showIntegratedShortcutEntry = showIntegratedShortcutEntry
)
}
}
Loading
Loading