ソースを参照

Rename constant

ashilkn 2 年 前
コミット
bd34571513

+ 1 - 1
lib/core/constants.dart

@@ -56,4 +56,4 @@ const double restrictedMaxWidth = 430;
 
 const double mobileSmallThreshold = 336;
 
-const deviceLimits = [50, 25, 10, 5, 2, 1];
+const publicLinkDeviceLimits = [50, 25, 10, 5, 2, 1];

+ 2 - 2
lib/ui/sharing/pickers/device_limit_picker_page.dart

@@ -79,7 +79,7 @@ class _ItemsWidgetState extends State<ItemsWidget> {
   void initState() {
     currentDeviceLimit = widget.collection.publicURLs!.first!.deviceLimit;
     initialDeviceLimit = currentDeviceLimit;
-    if (!deviceLimits.contains(currentDeviceLimit)) {
+    if (!publicLinkDeviceLimits.contains(currentDeviceLimit)) {
       isCustomLimit = true;
     }
     super.initState();
@@ -93,7 +93,7 @@ class _ItemsWidgetState extends State<ItemsWidget> {
         _menuItemForPicker(initialDeviceLimit),
       );
     }
-    for (int deviceLimit in deviceLimits) {
+    for (int deviceLimit in publicLinkDeviceLimits) {
       items.add(
         _menuItemForPicker(deviceLimit),
       );