From f10f6f58792c25f5531b679c17c41a15b3e6d101 Mon Sep 17 00:00:00 2001 From: sky121113 Date: Wed, 10 Jun 2026 09:42:30 +0800 Subject: [PATCH] =?UTF-8?q?[FEAT]=20General=20=E6=8E=A5=E9=80=9A=E5=8F=96?= =?UTF-8?q?=E8=B2=A8=E7=A2=BC=E5=85=A5=E5=8F=A3=EF=BC=88=E4=BE=9B=E5=AF=A6?= =?UTF-8?q?=E6=A9=9F=E6=B8=AC=E8=A9=A6=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - General SaleFlowHandler.onPickupRequested() 開啟 FontendPickupCodeDialog (原為空,導致取貨碼點不到) - 前台取貨碼浮鈕改由 flavor 資源 show_pickup_code_button 控制顯示: General=true 顯示,main/晟崴/中國醫=false 維持原本隱藏行為 至此 General 取貨碼與通行碼皆可實機測試。三 flavor 編譯/打包通過。 Co-Authored-By: Claude Opus 4.8 --- .../java/com/unibuy/smartdevice/ui/SaleFlowHandler.java | 4 +++- app/src/General/res/values/devset_defaults.xml | 2 ++ .../main/java/com/unibuy/smartdevice/ui/FontendActivity.java | 4 +++- app/src/main/res/values/devset_defaults.xml | 3 +++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/src/General/java/com/unibuy/smartdevice/ui/SaleFlowHandler.java b/app/src/General/java/com/unibuy/smartdevice/ui/SaleFlowHandler.java index 59a5b10..f1b6307 100644 --- a/app/src/General/java/com/unibuy/smartdevice/ui/SaleFlowHandler.java +++ b/app/src/General/java/com/unibuy/smartdevice/ui/SaleFlowHandler.java @@ -6,6 +6,7 @@ import com.unibuy.smartdevice.R; import com.unibuy.smartdevice.structure.SlotStructure; import com.unibuy.smartdevice.tools.HandlerMain; import com.unibuy.smartdevice.ui.dialog.BuyDialog; +import com.unibuy.smartdevice.ui.dialog.FontendPickupCodeDialog; import com.unibuy.v2.UnibuyHelper; import com.unibuy.v2.ui.ShoppingCartFragment; @@ -71,6 +72,7 @@ public class SaleFlowHandler { } public void onPickupRequested() { - // 通用版不處理取貨碼 + // 通用版取貨碼:開啟取貨碼輸入 Dialog + new FontendPickupCodeDialog(context, handlerMain).show(); } } diff --git a/app/src/General/res/values/devset_defaults.xml b/app/src/General/res/values/devset_defaults.xml index 981f2d5..9baeef4 100644 --- a/app/src/General/res/values/devset_defaults.xml +++ b/app/src/General/res/values/devset_defaults.xml @@ -8,4 +8,6 @@ true true true + + true diff --git a/app/src/main/java/com/unibuy/smartdevice/ui/FontendActivity.java b/app/src/main/java/com/unibuy/smartdevice/ui/FontendActivity.java index eef9021..8281f24 100644 --- a/app/src/main/java/com/unibuy/smartdevice/ui/FontendActivity.java +++ b/app/src/main/java/com/unibuy/smartdevice/ui/FontendActivity.java @@ -713,7 +713,9 @@ public class FontendActivity extends AppCompatActivityAbstract implements SaleFl } }); - binding.floatButtonPickupCode.setVisibility(View.GONE); + // 前台取貨碼浮鈕:由 flavor 設定決定是否顯示(General 顯示,其餘維持隱藏) + binding.floatButtonPickupCode.setVisibility( + getResources().getBoolean(R.bool.show_pickup_code_button) ? VISIBLE : View.GONE); binding.floatButtonShoppingCart.setOnClickListener(view -> { // 改由 flavor 的 SaleFlowHandler 決定:General 開多品項購物車 Fragment, diff --git a/app/src/main/res/values/devset_defaults.xml b/app/src/main/res/values/devset_defaults.xml index 6081e21..6c7400d 100644 --- a/app/src/main/res/values/devset_defaults.xml +++ b/app/src/main/res/values/devset_defaults.xml @@ -19,4 +19,7 @@ true true true + + + false