feat: track hashtags input usage
This commit is contained in:
@ -173,6 +173,16 @@ export function NoteCreator() {
|
|||||||
props ??= {};
|
props ??= {};
|
||||||
props["zap-split"] = true;
|
props["zap-split"] = true;
|
||||||
}
|
}
|
||||||
|
if (note.hashTags.length > 0) {
|
||||||
|
props ??= {};
|
||||||
|
props["hashtags"] = true;
|
||||||
|
}
|
||||||
|
if (props) {
|
||||||
|
props["content-warning"] ??= false;
|
||||||
|
props["poll"] ??= false;
|
||||||
|
props["zap-split"] ??= false;
|
||||||
|
props["hashtags"] ??= false;
|
||||||
|
}
|
||||||
trackEvent("PostNote", props);
|
trackEvent("PostNote", props);
|
||||||
|
|
||||||
const events = (note.otherEvents ?? []).concat(ev);
|
const events = (note.otherEvents ?? []).concat(ev);
|
||||||
@ -355,18 +365,18 @@ export function NoteCreator() {
|
|||||||
onChange={e => {
|
onChange={e => {
|
||||||
note.update(
|
note.update(
|
||||||
v =>
|
v =>
|
||||||
(v.selectedCustomRelays =
|
(v.selectedCustomRelays =
|
||||||
// set false if all relays selected
|
// set false if all relays selected
|
||||||
e.target.checked &&
|
e.target.checked &&
|
||||||
note.selectedCustomRelays &&
|
note.selectedCustomRelays &&
|
||||||
note.selectedCustomRelays.length == a.length - 1
|
note.selectedCustomRelays.length == a.length - 1
|
||||||
? undefined
|
? undefined
|
||||||
: // otherwise return selectedCustomRelays with target relay added / removed
|
: // otherwise return selectedCustomRelays with target relay added / removed
|
||||||
a.filter(el =>
|
a.filter(el =>
|
||||||
el === r
|
el === r
|
||||||
? e.target.checked
|
? e.target.checked
|
||||||
: !note.selectedCustomRelays || note.selectedCustomRelays.includes(el),
|
: !note.selectedCustomRelays || note.selectedCustomRelays.includes(el),
|
||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@ -435,9 +445,9 @@ export function NoteCreator() {
|
|||||||
onChange={e =>
|
onChange={e =>
|
||||||
note.update(
|
note.update(
|
||||||
v =>
|
v =>
|
||||||
(v.zapSplits = arr.map((vv, ii) =>
|
(v.zapSplits = arr.map((vv, ii) =>
|
||||||
ii === i ? { ...vv, weight: Number(e.target.value) } : vv,
|
ii === i ? { ...vv, weight: Number(e.target.value) } : vv,
|
||||||
)),
|
)),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
Reference in New Issue
Block a user