Skip to content

Fix/region toggle multi folder, remove finished searches from settings#918

Merged
volodkindv merged 3 commits into
cherrytea-dev:mainfrom
volodkindv:fix/region-toggle-multi-folder
Jul 9, 2026
Merged

Fix/region toggle multi folder, remove finished searches from settings#918
volodkindv merged 3 commits into
cherrytea-dev:mainfrom
volodkindv:fix/region-toggle-multi-folder

Conversation

@volodkindv

Copy link
Copy Markdown
Collaborator

No description provided.

When a display name maps to multiple folder IDs (e.g., Москва и МО –
Завершенные поиски → 411, 412, 415), the toggle must cover ALL of them.
Previously only a single folder_id was used (MIN from grouped query in MAX
bot, or last-wins iteration in VK bot), causing a stale checkmark loop:
- _get_subscribed_region_names showed checkmark (matched another folder_id)
- toggle only operated on the single known folder_id
- clicking could never fully unsubscribe

Fixes:
- toggle_region_by_name: check all folder_ids, subscribe/unsubscribe all
- MAX bot on_paginate_toggle: build folder_dict from full folder list
- VK bot _toggle_region_inline: accumulate folder_ids per name
@volodkindv volodkindv force-pushed the fix/region-toggle-multi-folder branch from 0ce45bd to e5b16dc Compare July 9, 2026 20:25
Кот and others added 2 commits July 9, 2026 20:30
Users should only subscribe to active searches and info support.
- Filter out folder_subtype='searches finished' in get_geo_folders()
  and get_geo_folders_by_district() queries
- Add migration 010 to clean up existing finished-search subscriptions
@volodkindv volodkindv changed the title Fix/region toggle multi folder Fix/region toggle multi folder, remove finished searches from settings Jul 9, 2026
@volodkindv volodkindv merged commit 364280a into cherrytea-dev:main Jul 9, 2026
2 checks passed
@volodkindv volodkindv deleted the fix/region-toggle-multi-folder branch July 9, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant