Dedup without keeping deleted array
This commit is contained in:
parent
48523a2269
commit
fef46823eb
5 changed files with 10 additions and 12 deletions
|
@ -20,7 +20,7 @@ import SettingsIcon from "@mui/icons-material/Settings";
|
|||
import AddIcon from "@mui/icons-material/Add";
|
||||
import AddDialog from "./AddDialog";
|
||||
import NotificationList from "./NotificationList";
|
||||
import DetailSettingsIcon from "./DetailSettingsIcon";
|
||||
import SubscriptionSettings from "./SubscriptionSettings";
|
||||
import theme from "./theme";
|
||||
import api from "../app/Api";
|
||||
import repository from "../app/Repository";
|
||||
|
@ -184,7 +184,7 @@ const App = () => {
|
|||
>
|
||||
{(selectedSubscription !== null) ? selectedSubscription.shortUrl() : "ntfy"}
|
||||
</Typography>
|
||||
{selectedSubscription !== null && <DetailSettingsIcon
|
||||
{selectedSubscription !== null && <SubscriptionSettings
|
||||
subscription={selectedSubscription}
|
||||
onClearAll={handleClearAll}
|
||||
onUnsubscribe={handleUnsubscribe}
|
||||
|
|
|
@ -11,7 +11,7 @@ import MoreVertIcon from "@mui/icons-material/MoreVert";
|
|||
import api from "../app/Api";
|
||||
|
||||
// Originally from https://mui.com/components/menus/#MenuListComposition.js
|
||||
const DetailSettingsIcon = (props) => {
|
||||
const SubscriptionSettings = (props) => {
|
||||
const [open, setOpen] = useState(false);
|
||||
const anchorRef = useRef(null);
|
||||
|
||||
|
@ -39,7 +39,7 @@ const DetailSettingsIcon = (props) => {
|
|||
const handleSendTestMessage = () => {
|
||||
const baseUrl = props.subscription.baseUrl;
|
||||
const topic = props.subscription.topic;
|
||||
api.publish(baseUrl, topic, `This is a test notification sent by the ntfy.sh Web UI at ${new Date().toString()}.`); // FIXME result ignored
|
||||
api.publish(baseUrl, topic, `This is a test notification sent by the ntfy Web UI at ${new Date().toString()}.`); // FIXME result ignored
|
||||
setOpen(false);
|
||||
}
|
||||
|
||||
|
@ -114,4 +114,4 @@ const DetailSettingsIcon = (props) => {
|
|||
);
|
||||
}
|
||||
|
||||
export default DetailSettingsIcon;
|
||||
export default SubscriptionSettings;
|
Loading…
Add table
Add a link
Reference in a new issue