1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
Removed image focus as different clients implement this differently
This commit is contained in:
xmflsct
2023-01-23 23:05:25 +01:00
parent 613cf1365c
commit 47d5b02468
16 changed files with 197 additions and 410 deletions

View File

@ -1,56 +1,38 @@
import { getAccountStorage } from '@utils/storage/actions'
const features = [
{
feature: 'account_follow_notify',
version: 3.3
},
{
feature: 'notification_type_status',
version: 3.3
},
{
feature: 'account_return_suspended',
version: 3.3
},
{
feature: 'edit_post',
version: 3.5
},
{
feature: 'deprecate_auth_follow',
version: 3.5
},
{
feature: 'notification_type_update',
version: 3.5
},
{
feature: 'notification_type_admin_signup',
version: 3.5
},
{
feature: 'notification_types_positive_filter',
version: 3.5
},
{
feature: 'trends_new_path',
version: 3.5
},
{
feature: 'follow_tags',
version: 4.0
},
{
feature: 'notification_type_admin_report',
version: 4.0
},
{
feature: 'filter_server_side',
version: 4.0
}
type Features =
| 'account_follow_notify'
| 'notification_type_status'
| 'account_return_suspended'
| 'edit_post'
| 'deprecate_auth_follow'
| 'notification_type_update'
| 'notification_type_admin_signup'
| 'notification_types_positive_filter'
| 'trends_new_path'
| 'follow_tags'
| 'notification_type_admin_report'
| 'filter_server_side'
| 'instance_new_path'
| 'edit_media_details'
const features: { feature: Features; version: number }[] = [
{ feature: 'account_follow_notify', version: 3.3 },
{ feature: 'notification_type_status', version: 3.3 },
{ feature: 'account_return_suspended', version: 3.3 },
{ feature: 'edit_post', version: 3.5 },
{ feature: 'deprecate_auth_follow', version: 3.5 },
{ feature: 'notification_type_update', version: 3.5 },
{ feature: 'notification_type_admin_signup', version: 3.5 },
{ feature: 'notification_types_positive_filter', version: 3.5 },
{ feature: 'trends_new_path', version: 3.5 },
{ feature: 'follow_tags', version: 4.0 },
{ feature: 'notification_type_admin_report', version: 4.0 },
{ feature: 'filter_server_side', version: 4.0 },
{ feature: 'instance_new_path', version: 4.0 },
{ feature: 'edit_media_details', version: 4.1 }
]
export const featureCheck = (feature: string, v?: string): boolean =>
export const featureCheck = (feature: Features, v?: string): boolean =>
(features.find(f => f.feature === feature)?.version || 999) <=
parseFloat(v || getAccountStorage.string('version'))