summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-10-01 13:43:27 +0200
committernsensfel <SpamShield0@noot-noot.org>2018-10-01 13:43:27 +0200
commitac115cb162448a60ef788783a35a71fdf9a96457 (patch)
tree7e72db7e850f7d871a282bcda16b8493571e3cf5
parent612f46b26057409eecf93f5473f42bbd9ed7afe3 (diff)
downloadtacticians-extension-master.zip
tacticians-extension-master.tar.bz2
Got it to work.HEADmaster
-rw-r--r--src/background/src/Struct/Model.elm2
-rw-r--r--src/background/src/Update/HandleServerReply.elm4
-rw-r--r--www/script/notification.js4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/background/src/Struct/Model.elm b/src/background/src/Struct/Model.elm
index 5e09f9d..d7f4085 100644
--- a/src/background/src/Struct/Model.elm
+++ b/src/background/src/Struct/Model.elm
@@ -50,7 +50,7 @@ new flags =
{
flags = flags,
players = (Array.fromList (Struct.Flags.get_players flags)),
- remaining_updates = 0,
+ remaining_updates = (List.length (Struct.Flags.get_players flags)),
error = Nothing
}
diff --git a/src/background/src/Update/HandleServerReply.elm b/src/background/src/Update/HandleServerReply.elm
index 983043d..b69233a 100644
--- a/src/background/src/Update/HandleServerReply.elm
+++ b/src/background/src/Update/HandleServerReply.elm
@@ -82,7 +82,7 @@ handle_set_battles battles current_state =
in
(
updated_model,
- cmds
+ (maybe_update_storage updated_model cmds)
)
(Just player) ->
@@ -105,7 +105,7 @@ handle_set_battles battles current_state =
in
(
updated_model,
- (maybe_update_storage model cmds)
+ (maybe_update_storage updated_model cmds)
)
apply_command : (
diff --git a/www/script/notification.js b/www/script/notification.js
index d997ba9..e8f8956 100644
--- a/www/script/notification.js
+++ b/www/script/notification.js
@@ -8,13 +8,13 @@ tacticians_online.notification = new Object();
tacticians_online.notification.activate =
function ()
{
- browser.browserAction.setIcon("images/to-favicon-notification.svg");
+ browser.browserAction.setBadgeText({text: "!"});
}
tacticians_online.notification.disable =
function (encoded_notification)
{
- browser.browserAction.setIcon("images/to-favicon.svg");
+ browser.browserAction.setBadgeText({text: ""});
}
tacticians_online.notification.attach_to =