Recent change added Delete button to game-over alert, but only when no
unacked messages remained (since deleted games can't continue trying to
send messages other games might still need to know the game's over.)
Typically the alert would go up and then, if the remote device is
online, shortly after acks would arrive. Now when that happens the alert
gets updated to offer to delete and archive.
There's code on all platforms to force user to have dict prior to
opening a game or responding to an invitation. "Empty" dict play hasn't
made sense in a long time.
Once in the archive games don't ever send unless opened explicitly (no
resend-all-on-gained-network stuff for them). So don't offer to put a
game there if it has unsent (unacked) messages. Should prevent problem
of a host being archived before it's managed to send its final move to
all guests.
Scroller is allowed only one child and I guess I wanted the TableLayout
to suffice, but having unrelated stuff in it sucked. So wrap it in a
LinearLayout and move the unrelated stuff out.
commit f68186cafb
Author: Bernard Massot <bmassot@free.fr>
Date: Sun Feb 21 19:22:45 2021 +0000
Translated using Weblate (French)
Currently translated at 99.4% (883 of 888 strings)
commit fabc29dfef
Author: Bernard Massot <bmassot@free.fr>
Date: Sun Feb 21 18:25:36 2021 +0000
Translated using Weblate (French)
Currently translated at 99.3% (882 of 888 strings)
commit b26f383d32
Author: Hosted Weblate <hosted@weblate.org>
Date: Sun Feb 21 19:09:29 2021 +0100
Update translation files
Updated by "Cleanup translation files" hook in Weblate.
Translation: Crosswords/Android
Translate-URL: https://hosted.weblate.org/projects/xwords/android/
I want to encourage people not to think there's action to be taken
between when they invite and an invitee responds, e.g. to email. So make
the "Close Game" button the "positive" one that case.
I balked at writing code consisting of a bunch of classes there only to
provide a mapping to resource file IDs, instead opting to generate them.
(The right move might have been to generate everything from the old
xwprefs.xml, but it's too late for that. :-)
I realized I'd made some mistakes and so rebuilt them from the old
xwprefs.xml file. Didn't find any new mistakes, but there are fewer
unnecessary changes so the release-to-release diff should make more
sense.
commit 8e985b09a7
Author: Bernard Massot <bmassot@free.fr>
Date: Wed Feb 17 22:47:17 2021 +0000
Translated using Weblate (French)
Currently translated at 99.3% (883 of 889 strings)
We've decided that on upgrade users shouldn't be surprised by a busy
board and unaware of how to fix it. So keep it the way it's been and let
the curious discover the new ability. Also, simplify code.
commit 3176272c43
Author: Muha Aliss <muhaaliss@pm.me>
Date: Tue Feb 9 17:56:50 2021 +0000
Translated using Weblate (Turkish)
Currently translated at 4.2% (38 of 887 strings)
commit 5579eae91d
Author: Bernard Massot <bmassot@free.fr>
Date: Thu Feb 11 21:27:37 2021 +0000
Translated using Weblate (French)
Currently translated at 99.2% (880 of 887 strings)
This is an experiment. I suspect the eventual fix will be to have two
modes, one of which draws the values and the other doesn't, replacing
the TILES/VALUES pref.
Use the current recommended classes and organization of app
settings. Means breaking xwprefs.xml into eight or so files and a bunch
of changes to classes derived from Preference. Seems to work, but there
will be bugs. Also got rid of most Activity subclasses that were
alternatives to Fragments, since all Android versions I'm allowed to
support now support Fragments.
commit 663c0c3395
Author: Wellington Terumi Uemura <wellingtonuemura@gmail.com>
Date: Sat Jan 23 16:22:50 2021 +0000
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (887 of 887 strings)
commit d255dc7758
Author: Allan Nordhøy <epost@anotheragency.no>
Date: Sun Jan 17 18:26:54 2021 +0000
Translated using Weblate (Norwegian Bokmål)
Currently translated at 69.3% (619 of 892 strings)
commit 542af0a287
Author: Allan Nordhøy <epost@anotheragency.no>
Date: Sun Jan 17 18:27:24 2021 +0000
Translated using Weblate (English)
Currently translated at 100.0% (892 of 892 strings)
commit 8ced0990d0
Author: Luca De Filippo <luca.defilippo@translationcommons.org>
Date: Thu Jan 14 15:41:05 2021 +0000
Translated using Weblate (Italian)
Currently translated at 96.3% (859 of 892 strings)
commit 8ced0990d0
Author: Luca De Filippo <luca.defilippo@translationcommons.org>
Date: Thu Jan 14 15:41:05 2021 +0000
Translated using Weblate (Italian)
Currently translated at 96.3% (859 of 892 strings)
Returning null from createDialog() isn't allowed, so return this as a
fallback as before. But the old code immediately dismissed it and
created another in an infinite loop. So just suck it up and display it.
And as always hope users don't see it.
commit ef81d3ce08
Author: joaooliva <joaooliva@protonmail.com>
Date: Sun Jan 3 18:15:16 2021 +0000
Translated using Weblate (Portuguese (Brazil))
Currently translated at 97.1% (867 of 892 strings)
Author: joaooliva <joaooliva@protonmail.com>
Date: Sun Jan 3 03:54:00 2021 +0000
Translated using Weblate (Portuguese (Brazil))
Currently translated at 88.4% (784 of 886 strings)
Author: Luca De Filippo <luca.defilippo@translationcommons.org>
Date: Mon Dec 14 15:04:16 2020 +0000
Translated using Weblate (Italian)
Currently translated at 2.8% (25 of 883 strings)
Fix -- I think -- problem where game-deleted message received but not
handled by ChatDelegate would loop forever. Fix is to let non-visible
fragments take a shot, the BoardDelegate in this case. Seems to work,
but wasn't 100% reproducible AND the fix may break something else.
For some reason, in Spanish but not Catalan, filtering doesn't work with
two-letter tiles. The reason is that e.g. with RR two patterns, R.R and
RR (i.e. two R tiles, or one RR tile), are returned. The first shouldn't
be there since there are no words with RR that are spelled with two R
tiles. Until I can fix this picking the second (last) pattern seems to
work better.
If I can't figure out how to register for .xwd files, next best idea is
to encode a download in a custom url. This is one way of doing that, and
works with the urls just added to BYOD. Will likely change.
Known Players is a feature I'm devloping and right now want to keep it
capitalized as players learn what it is. It's only in debug builds at
the moment anyway.
Catch the onCancelled event, and treat as "close" button tap. Also
disable cancel via taps outside the alert, which I think is less
confusing than leaving the unplayable game up without the alert or
closing it without explanation.
BoardDelegate can have a one-to-one relationship to this thing, and
occasional leakage was preventing opening a new alert, so some fix was
needed. This one's simple.
Because I'm doing a singleton thing, if I miss the alert going away I
won't up another up. This tries to always catch dismissal. Might still
be screwed if it's not actually put up for some reason. Needs testing.
Try using both secure and insecure sockets. The latter appears to cause
fewer problems on OS/device combos with crappy BT. It's only possible if
I know the addr of the device I want to, so hack around that being
secret by passing it on request.
If inviting known players to a more-than-two-player game, can select all
at once. Required using checkboxes instead of radiobuttons for the case
where nMissing > 1.
Create new class that owns the alert. Let it decide whether to post,
remove, etc. Seems to work, but I've removed some of the "reinvite"
options I'm not sure were helpful anyway. To be considered...
When thumbnail was required but couldn't be produced list item showed up
tiny as height followed thumbnail's. Instead, when there's no thumbnail
behave as if it's disabled, a layout that looks ok.
There are ways I can't record a close, e.g. user swiping app to kill
it. To avoid that leading to a corrupt-game warning, or to failure to
open in background, drop the count to 0 rather then merely decrementing
it when it closes correctly. Assumption is that if it closes ok once
it's ok.
Invitations over MQTT were handled by different code that always opened
the new game on top of any other open one. Use instead existing code
that puts up a notification instead where appropriate.
I'm fixing android client not showing stats for or allowing to disable
mqtt after it's added automatically to a game that connects
otherwise. Problem was that only the channel got the mqtt address
flag. So now add the flag for any type that's added.
Don't wait for user to tap one of the buttons. Instead notice when
scrolling becomes possible, and offer once per launch until user says
"hide" or clicks the don't-ask-again box.
This won't impact shipping code, but if during development I add then
remove a new INVITEMEANS I can crash with AIOOB trying to load by
ordinal. So check first.
It's simpler this way, and I'm tired of stuff not happening because the
OS chooses not to schedule e.g. an invitation send for minutes. Goal's
to be running BluetoothServerSocket.accept() as much as possible when
there are active BT games in play OR when the game's in the foreground.
If that's happening, sent invitations and moves will be received when
users expect. When there's no traffic and app isn't being brought to
foreground, backoff will ensure I don't try to run accept() too often.
FWIW, BTLE seems to offer a better way to do this (to have an app be
responsive to incoming invitations when it hasn't run in the foreground
in a while), but it requires users to accept FINE_LOCATION
permission. I'm hoping I can make this work to avoid asking for that
permission.
Add a single method to provide candidate devices; don't bother passing
bogus BT MAC addrs; let instance belonging to background-user start
communicating again when user becomes foreground.
I was comparing the wrong strings and so broke deleting known BT
devices. And wanted to see how often since I'd seen them updated, though
every 10 seconds is still 10 seconds.
Some devices unpair themselves and needed to stop being listed so user'd
know to fix. And my Nexus 5x is neither a PHONE nor a COMPUTER per BT,
so accept a larger range of BT classes when scanning.
Working around a bug in Android 11 that broke invitation http urls
getting passed to CrossWords. They always launch the backstop script on
eehouse.org. So modify that script to include a link that will pass the
invitation params to CrossWords via a proprietary scheme it already
registers for. No change to app required!
The last change meant the test whether to show the words under the
pen-down cell would pass when it shouldn't because a drag to an occupied
location didn't register as movement. Change so movement counts to stop
the timer even if it wouldn't change the drag-target's location.
Rather than have a tile revert to its original location if it's dropped
where it can't be (on an occupied tile or outside the board), put it in
the last place it could have been. Do that by only updating cur when
it's to a legal location, and then relocating to cur when drag ends.
If you've bypassed the quick-start game it's probably because you want
to play somebody not yet in the Known Players list. So don't start out
with that list as how you'll invite.
Not at all tested, but now the game's timestamp is kept and passed in to
where it can be used to determine, e.g., which of two Bluetooth device
names to keep for a given opponent.
Got as far as having gtk client display list of previously harvested
known players to be invited. Their addresses, or at least mqtt ids are
saved. Next is to actually invite one.
I have a case where app crashed on launch due to the assert that resend_all()
wasn't being called on a standalone game. That happened because somehow
the game's android-side db entry showed pending packets to send, though the
game type was correct. Fix is to check for game type also, but also to add
a test so comms won't get invoked with a null ptr on release builds.
At least one device was mysteriously losing games. They were winding up
with a group ID for a non-existant group. Now on startup I look for such
games and assign them to a new "recovered games" group. We'll see how
common this is before deciding whether it's a good enough
solution. Another perhaps better solution would be to display all games,
ordered by groups, rather than displaying all known groups and their
games.
On a small-screen (?) emulator (Nexus 5 1080x1920) the icons in the
new-game alerts are huge. Setting their size to 32x32 instead of 120x120
seems to fix this. Haven't tested on more than two devices, on one of
which they were ok before and still are.
Doing away with letting user build a local phone list (left over from
the NBS case where it made sense.) Just launch the default SMS app with
the message and let 'em choose a recipient. Hard to test, but works on
two of two phones so far.
It's coming up too often, sometimes several times in a row so that all
must be dismissed. Until I can detect which result from explicit user
action (tapping a URL) rather than duplicated delivery over MQTT and
bluetooth, this is better.
I'm using model names to detect duplicates, but there are enough that
may not suffice. So add a new random per-device ID to be used only until
the dupes are resolved.
Thanks to my use of unseeded() rand() early on to generate mqtt device
IDs, a handful of devices are using the same devIDs. The server notices
this and passes a new response which triggers generating a new id that
should be unique (rand() being seeded earlier now.) Testing says the
games that are left behind with the old devid will limp along thanks to
their relay connection while newer games will be better.
Not sure this even belongs here, but that decision will wait until BYOD
is online and I have to figure out how people will distribute custom
wordlists.
I'm fixing android client not showing stats for or allowing to disable
mqtt after it's added automatically to a game that connects
otherwise. Problem was that only the channel got the mqtt address
flag. So now add the flag for any type that's added.
Don't wait for user to tap one of the buttons. Instead notice when
scrolling becomes possible, and offer once per launch until user says
"hide" or clicks the don't-ask-again box.
Invitations will now only allow opening the game (Dbg or not) that
created them. Should prevent bogus warnings that games have been
deleted. Impacts only developers and friends running CrossDbg and
CrossWords on the same device. Can still get games going between the two
using room names or invite-by-devid.