|
|
@ -50,7 +50,7 @@ class ReplaceRuleAdapter(context: Context, var callBack: CallBack) : |
|
|
|
val targetItem = getItem(targetPosition) |
|
|
|
val targetItem = getItem(targetPosition) |
|
|
|
if (srcItem != null && targetItem != null) { |
|
|
|
if (srcItem != null && targetItem != null) { |
|
|
|
if (srcItem.order == targetItem.order) { |
|
|
|
if (srcItem.order == targetItem.order) { |
|
|
|
callBack.upOrder(getItems()) |
|
|
|
callBack.upOrder() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
val srcOrder = srcItem.order |
|
|
|
val srcOrder = srcItem.order |
|
|
|
srcItem.order = targetItem.order |
|
|
|
srcItem.order = targetItem.order |
|
|
@ -70,6 +70,6 @@ class ReplaceRuleAdapter(context: Context, var callBack: CallBack) : |
|
|
|
fun delete(rule: ReplaceRule) |
|
|
|
fun delete(rule: ReplaceRule) |
|
|
|
fun edit(rule: ReplaceRule) |
|
|
|
fun edit(rule: ReplaceRule) |
|
|
|
fun toTop(rule: ReplaceRule) |
|
|
|
fun toTop(rule: ReplaceRule) |
|
|
|
fun upOrder(rules: List<ReplaceRule>) |
|
|
|
fun upOrder() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|