mirror of
https://github.com/discourse/discourse.git
synced 2026-08-08 12:08:12 -05:00
FIX: set reminder options on menu render (#35694)
Without this when we set bookmark reminders the time is based on when the element was first added to the page which may be much prior
This commit is contained in:
@@ -2,7 +2,6 @@ import Component from "@glimmer/component";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import { fn } from "@ember/helper";
|
||||
import { action } from "@ember/object";
|
||||
import didInsert from "@ember/render-modifiers/modifiers/did-insert";
|
||||
import { service } from "@ember/service";
|
||||
import DButton from "discourse/components/d-button";
|
||||
import DropdownMenu from "discourse/components/dropdown-menu";
|
||||
@@ -22,6 +21,7 @@ export default class BookmarkMenu extends Component {
|
||||
@service toasts;
|
||||
|
||||
@tracked quicksaved = false;
|
||||
@tracked reminderAtOptions = [];
|
||||
|
||||
bookmarkManager = this.args.bookmarkManager;
|
||||
timezone = this.currentUser?.user_option?.timezone || moment.tz.guess();
|
||||
@@ -143,6 +143,7 @@ export default class BookmarkMenu extends Component {
|
||||
|
||||
@action
|
||||
onShowMenu() {
|
||||
this.setReminderShortcuts();
|
||||
if (!this.existingBookmark) {
|
||||
this.onBookmark();
|
||||
}
|
||||
@@ -253,7 +254,6 @@ export default class BookmarkMenu extends Component {
|
||||
|
||||
<template>
|
||||
<DMenu
|
||||
{{didInsert this.setReminderShortcuts}}
|
||||
...attributes
|
||||
@identifier="bookmark-menu"
|
||||
class={{this.buttonClasses}}
|
||||
|
||||
Reference in New Issue
Block a user