예제 #1
0
        private async Task selectTags()
        {
            analyticsService.EditEntrySelectTag.Track();
            analyticsService.EditViewTapped.Track(EditViewTapSource.Tags);

            var currentTags = tagIds.OrderBy(CommonFunctions.Identity).ToArray();

            var chosenTags = await Navigate <SelectTagsViewModel, SelectTagsParameter, long[]>(new SelectTagsParameter(currentTags, workspaceId));

            if (chosenTags.OrderBy(CommonFunctions.Identity).SequenceEqual(currentTags))
            {
                return;
            }

            var tags = await interactorFactory.GetMultipleTagsById(chosenTags).Execute();

            tagsSubject.OnNext(tags);
        }
        private async Task selectTags()
        {
            if (!(Workspace.Value?.Id is long workspaceId))
            {
                return;
            }

            var currentTags = Tags.Value.Select(t => t.Id).OrderBy(CommonFunctions.Identity).ToArray();

            var chosenTags = await Navigate <SelectTagsViewModel, SelectTagsParameter, long[]>(
                new SelectTagsParameter(currentTags, workspaceId, false));

            if (chosenTags.OrderBy(CommonFunctions.Identity).SequenceEqual(currentTags))
            {
                return;
            }

            var selectedTags = await interactorFactory.GetMultipleTagsById(chosenTags).Execute();

            Tags.Accept(selectedTags);
        }