1
0
forked from BRT/arc

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:
slava 2026-04-18 20:08:45 +07:00
parent bac36aa5d2
commit 248fae6061

View File

@ -432,6 +432,18 @@ void GetLastTransactionsScript::searchTransaction(const DeviceInfo &device, int
QThread::msleep(1500);
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);
qDebug() << "[FetchTransactions] Found" << txButtons.size() << "buttons, dateY range:"