Deleted app.find()

This commit is contained in:
2018-04-02 07:44:11 +02:00
parent 88296da8be
commit ab0c933b3d
9 changed files with 33 additions and 37 deletions

View File

@ -4,7 +4,7 @@ import AnimeNotifier from "../AnimeNotifier"
export function followUser(arn: AnimeNotifier, elem: HTMLElement) {
return arn.post(elem.dataset.api, "")
.then(() => arn.reloadContent())
.then(() => arn.statusMessage.showInfo("You are now following " + arn.app.find("nick").innerText + "."))
.then(() => arn.statusMessage.showInfo("You are now following " + document.getElementById("nick").innerText + "."))
.catch(err => arn.statusMessage.showError(err))
}
@ -12,6 +12,6 @@ export function followUser(arn: AnimeNotifier, elem: HTMLElement) {
export function unfollowUser(arn: AnimeNotifier, elem: HTMLElement) {
return arn.post(elem.dataset.api, "")
.then(() => arn.reloadContent())
.then(() => arn.statusMessage.showInfo("You stopped following " + arn.app.find("nick").innerText + "."))
.then(() => arn.statusMessage.showInfo("You stopped following " + document.getElementById("nick").innerText + "."))
.catch(err => arn.statusMessage.showError(err))
}