Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d91185b

Browse files
committedSep 21, 2024·
Safeguard against long names
Just truncate station name at 120/100 chars - I don't think any frontend want to display 250 characters long station name, on mobile.
1 parent d3f75f2 commit d91185b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎mapadroid/db/DbPogoProtoSubmitRaw.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ async def stations(self, session: AsyncSession, received_timestamp: int,
13471347
station_obj.id = station_id
13481348
station_obj.lat = latitude
13491349
station_obj.lon = longitude
1350-
station_obj.name = name
1350+
station_obj.name = name if len(name) < 120 else name[:100]+"..."
13511351

13521352
if station.battle_details and station.battle_details.battle_window_end_ms > 0:
13531353
bdetails: pogoprotos.BreadBattleDetailProto = station.battle_details

0 commit comments

Comments
 (0)
Please sign in to comment.