mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2026-05-09 18:11:26 +08:00
add asn import (#333)
This commit is contained in:
@@ -15,7 +15,7 @@ class MetaFeatureSettingsDesign(
|
||||
configuration: ConfigurationOverride
|
||||
) : Design<MetaFeatureSettingsDesign.Request>(context) {
|
||||
enum class Request {
|
||||
ResetOverride, ImportGeoIp, ImportGeoSite, ImportCountry
|
||||
ResetOverride, ImportGeoIp, ImportGeoSite, ImportCountry, ImportASN
|
||||
}
|
||||
|
||||
private val binding = DesignSettingsMetaFeatureBinding
|
||||
@@ -255,6 +255,15 @@ class MetaFeatureSettingsDesign(
|
||||
requests.trySend(Request.ImportCountry)
|
||||
}
|
||||
}
|
||||
|
||||
clickable (
|
||||
title = R.string.import_asn_file,
|
||||
summary = R.string.press_to_import,
|
||||
){
|
||||
clicked {
|
||||
requests.trySend(Request.ImportASN)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
binding.content.addView(screen.root)
|
||||
|
||||
@@ -316,6 +316,7 @@
|
||||
<string name="press_to_import">Press to import...</string>
|
||||
<string name="import_geosite_file">Import GeoSite Database</string>
|
||||
<string name="import_country_file">Import Country Database</string>
|
||||
<string name="import_asn_file">Import ASN Database</string>
|
||||
<string name="geofile_import_failed">Import failed</string>
|
||||
<string name="geofile_unknown_db_format">Unknown Database format</string>
|
||||
<string name="geofile_unknown_db_format_message">Only %1$s are supported</string>
|
||||
|
||||
Reference in New Issue
Block a user