Improve scroll recovery logic in GetLastTransactionsScript:
- Add upward scroll handling to recover header visibility when the target header scrolls out of view.
This commit is contained in:
parent
bac36aa5d2
commit
248fae6061
@ -432,6 +432,18 @@ void GetLastTransactionsScript::searchTransaction(const DeviceInfo &device, int
|
|||||||
QThread::msleep(1500);
|
QThread::msleep(1500);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (dateHeaderY == 0 && nextDateHeaderY < device.screenHeight) {
|
||||||
|
// Target-header ушёл вверх, видна только более старая дата.
|
||||||
|
// Кнопки выше nextDateHeaderY могут принадлежать промежуточным
|
||||||
|
// (пропущенным) датам — матчить их опасно. Скроллим обратно вверх.
|
||||||
|
qDebug() << "[FetchTransactions] Target scrolled above — scrolling up to recover";
|
||||||
|
AdbUtils::makeSwipe(m_deviceId, device.screenWidth / 2,
|
||||||
|
device.screenHeight / 3,
|
||||||
|
device.screenWidth / 2,
|
||||||
|
device.screenHeight * 2 / 3, 600);
|
||||||
|
QThread::msleep(1500);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
QList<Node> txButtons = xmlScreenParser.findTransactionButtons(20);
|
QList<Node> txButtons = xmlScreenParser.findTransactionButtons(20);
|
||||||
qDebug() << "[FetchTransactions] Found" << txButtons.size() << "buttons, dateY range:"
|
qDebug() << "[FetchTransactions] Found" << txButtons.size() << "buttons, dateY range:"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user