-
Notifications
You must be signed in to change notification settings - Fork 109
TF-4195 Add a label to an email #4204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dab246
wants to merge
7
commits into
features/label
Choose a base branch
from
feature/tf-4195-add-a-label-to-an-email
base: features/label
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,522
−153
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
fa69cf3
TF-4195 Add `Label as` to email context menu
dab246 0e9f7ca
TF-4195 Show submenu when hover Label As item
dab246 83b454a
TF-4195 Add interactor/repository/datasource to feature add a Label t…
dab246 e3ffe44
TF-4195 Implement add a Label to an email
dab246 06441ad
TF-4195 Implement add a Label to an email on mobile
dab246 5e84c27
TF-4195 Fix comments of coderabbit
dab246 724f2f5
fixup! TF-4195 Fix comments of coderabbit
dab246 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
labels/lib/converter/keyword_identifier_nullable_converter.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import 'package:jmap_dart_client/jmap/mail/email/keyword_identifier.dart'; | ||
| import 'package:json_annotation/json_annotation.dart'; | ||
|
|
||
| class KeywordIdentifierNullableConverter | ||
| implements JsonConverter<KeyWordIdentifier?, String?> { | ||
| const KeywordIdentifierNullableConverter(); | ||
|
|
||
| @override | ||
| KeyWordIdentifier? fromJson(String? json) => | ||
| json != null ? KeyWordIdentifier(json) : null; | ||
|
|
||
| @override | ||
| String? toJson(KeyWordIdentifier? object) => object?.value; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
lib/features/base/widget/popup_menu/hover_submenu_controller.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| import 'dart:async'; | ||
|
|
||
| import 'package:flutter/foundation.dart'; | ||
|
|
||
| class HoverSubmenuController { | ||
| HoverSubmenuController({ | ||
| this.exitDelay = const Duration(milliseconds: 120), | ||
| }); | ||
|
|
||
| final Duration exitDelay; | ||
|
|
||
| final ValueNotifier<bool> isHovering = ValueNotifier(false); | ||
|
|
||
| int _hoverRefCount = 0; | ||
| Timer? _exitTimer; | ||
|
|
||
| void enter() { | ||
| _exitTimer?.cancel(); | ||
| _hoverRefCount++; | ||
| if (!isHovering.value) { | ||
| isHovering.value = true; | ||
| } | ||
| } | ||
|
|
||
| void exit() { | ||
| _hoverRefCount = (_hoverRefCount - 1).clamp(0, 999); | ||
|
|
||
| if (_hoverRefCount == 0) { | ||
| _exitTimer?.cancel(); | ||
| _exitTimer = Timer(exitDelay, () { | ||
| if (_hoverRefCount == 0) { | ||
| isHovering.value = false; | ||
| } | ||
| }); | ||
| } | ||
| } | ||
|
|
||
| void dispose() { | ||
| _exitTimer?.cancel(); | ||
| isHovering.dispose(); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.