Commit a019cd85 by Wyh

6.17 提交

parent c674b533
......@@ -219,7 +219,7 @@ public class ArmsUtils {
mToast.cancel();
mToast = null;
}
mToast = Toast.makeText(context, string, Toast.LENGTH_SHORT);
mToast = Toast.makeText(context.getApplicationContext(), string, Toast.LENGTH_SHORT);
mToast.setText(string);
mToast.show();
}
......
......@@ -17,7 +17,7 @@ public class ToastUtils {
public void run() {
if (context != null) {
if (mToast == null) {
mToast = Toast.makeText(context, text, duration);
mToast = Toast.makeText(context.getApplicationContext(), text, duration);
} else {
mToast.setText(text);
mToast.setDuration(duration);
......
......@@ -497,7 +497,7 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
/**
* 打開錢箱
*/
fun openCashBox(){
fun openCashBox() {
CC.obtainBuilder("Component.Print")
.addParam(PrintConstans.PRINT_TYPE, 6)
.addParam(PrintConstans.PRINT_LOADING, false)
......@@ -543,6 +543,10 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
launch({
repository.getDeliveryInfo(GsaCloudApplication.getRestaurantId(context).toString(), GsaCloudApplication.getMemberId(context).toString()).apply {
deliveryBean = this
if (this.data.isEmpty()) {
ToastUtils.show(context, "沒有配置配送員信息")
return@apply
}
//顯示選擇派送員
object : DialogUtils(context, R.layout.other_order_layout_assign_deliveryman) {
override fun initLayout(hepler: ViewHepler?, dialog: Dialog?) {
......@@ -592,7 +596,7 @@ class PageViewModel(private val repository: WeatherRepository) : ViewModel() {
.setGravity(Gravity.BOTTOM)
.show()
}
},{
}, {
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment