|
@@ -252,7 +252,96 @@ class ModeEntranceActivity : CommonBindingActivity<ActivityModeEntranceBinding>(
|
|
|
}
|
|
|
}
|
|
|
}.models = DataFactory.get002DEntranceData()
|
|
|
- } else {
|
|
|
+ }
|
|
|
+
|
|
|
+// else if (getSN().startsWith("011A")) {
|
|
|
+// binding.entranceRecycle.apply {
|
|
|
+// grid(2)
|
|
|
+// setup {
|
|
|
+// addType<EntranceData>(R.layout.item_entrance)
|
|
|
+// onBind {
|
|
|
+// val itemView = findView<EntranceItemView>(R.id.entrance_item)
|
|
|
+// val params = itemView.layoutParams as LayoutParams
|
|
|
+// params.height = (ScreenUtil.getScreenSize(this@ModeEntranceActivity)[1] / 2)
|
|
|
+// itemView.layoutParams = params
|
|
|
+// itemView.setEntranceData(getModel())
|
|
|
+//
|
|
|
+// }
|
|
|
+// R.id.entrance_item.onClick {
|
|
|
+// val clickModel = getModel<EntranceData>()
|
|
|
+// title = getString(clickModel.title2StrId)
|
|
|
+// when (clickModel.type) {
|
|
|
+// EntranceType.automatic_recipes -> {
|
|
|
+// if (FoodDataProvider.checkDataExit()) {
|
|
|
+// val bundle = Bundle()
|
|
|
+// bundle.putInt(MODE_ENTRANCE, Recipes)
|
|
|
+// bundle.putInt(RECIPES_TYPE, LocalFood)
|
|
|
+// bundle.putString(HOME_TITLE, title)
|
|
|
+// navigateTo(Screens.Main.HOME) {
|
|
|
+// with(bundle)
|
|
|
+// }
|
|
|
+// } else {
|
|
|
+// showLoading()
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// EntranceType.automatic_programmes -> {
|
|
|
+// if (FoodDataProvider.checkDataExit()) {
|
|
|
+// val bundle = Bundle()
|
|
|
+// bundle.putInt(MODE_ENTRANCE, Mode)
|
|
|
+// bundle.putString(HOME_TITLE, title)
|
|
|
+// navigateTo(Screens.Main.HOME) {
|
|
|
+// with(bundle)
|
|
|
+// }
|
|
|
+// } else {
|
|
|
+// showLoading()
|
|
|
+// }
|
|
|
+//
|
|
|
+// }
|
|
|
+//
|
|
|
+// EntranceType.manual_cooking -> {
|
|
|
+// if (FoodDataProvider.checkDataExit()) {
|
|
|
+// navigateTo(Screens.Cook.COOK_MODES) {
|
|
|
+// if (DevModes.SOUP == CofarSDK.devInfo().devMode) {
|
|
|
+// val bundle = Bundle()
|
|
|
+// bundle.putString(MODE_TYPE, WorkModes.ADAPTED_COOKING)
|
|
|
+// bundle.putString(
|
|
|
+// "mode_name",
|
|
|
+// resources.getString(com.develop.common.R.string.adapted_cooking)
|
|
|
+// )
|
|
|
+// with(bundle)
|
|
|
+// } else {
|
|
|
+// val bundle = Bundle()
|
|
|
+// bundle.putString(MODE_TYPE, WorkModes.AF_DIY)
|
|
|
+// with(bundle)
|
|
|
+// }
|
|
|
+// }
|
|
|
+// } else {
|
|
|
+// showLoading()
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// EntranceType.download_new_recipes -> {
|
|
|
+// if (FoodDataProvider.checkDataExit()) {
|
|
|
+// val bundle = Bundle()
|
|
|
+// bundle.putInt(MODE_ENTRANCE, Recipes)
|
|
|
+// bundle.putInt(RECIPES_TYPE, NetFood)
|
|
|
+// bundle.putString(HOME_TITLE, title)
|
|
|
+// navigateTo(Screens.Main.HOME) {
|
|
|
+// with(bundle)
|
|
|
+// }
|
|
|
+// } else {
|
|
|
+// showLoading()
|
|
|
+// }
|
|
|
+//
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }.models = DataFactory.get011AEntranceData()
|
|
|
+// }
|
|
|
+//
|
|
|
+ else {
|
|
|
binding.entranceRecycle.apply {
|
|
|
grid(2)
|
|
|
setup {
|
|
@@ -337,9 +426,10 @@ class ModeEntranceActivity : CommonBindingActivity<ActivityModeEntranceBinding>(
|
|
|
}
|
|
|
}
|
|
|
}.models =
|
|
|
- if (isBrand036I()) DataFactory.get036IEntranceData() else if (isBrand011A()) DataFactory.get011AEntranceData() else DataFactory.getEntranceData()
|
|
|
+ if (isBrand036I()) DataFactory.get036IEntranceData() else if (isBrand011A()) DataFactory.get011AEntranceData()else DataFactory.getEntranceData()
|
|
|
}
|
|
|
|
|
|
+// if (isBrand011A()) DataFactory.get011AEntranceData()
|
|
|
binding.rightContentLayout.setOnClickListener {
|
|
|
|
|
|
}
|