fix late lastLoadedPostDate initialization
This commit is contained in:
parent
3333013fd1
commit
7ed3f0193f
12
manager.cpp
12
manager.cpp
@ -60,6 +60,12 @@ void RepostManager::load_more_telegram_chats() {
|
||||
|
||||
void RepostManager::start() {
|
||||
m_nRequiredChats = 100500;//m_appConfig->tgSources.size() + 1;
|
||||
for (auto &appState : m_appState->vkRepostState) {
|
||||
appState.lastLoadedPostDate = appState.lastForwardedPostDate;
|
||||
}
|
||||
for (auto &appState : m_appState->tgRepostState) {
|
||||
appState.lastLoadedPostDate = appState.lastForwardedPostDate;
|
||||
}
|
||||
m_tg.add_update_handler([this](void*, td_api::Object &obj){
|
||||
if (obj.get_id() == td_api::updateAuthorizationState::ID) {
|
||||
auto &authState = (td_api::updateAuthorizationState&)obj;
|
||||
@ -344,12 +350,6 @@ void NewPostFetcher::check_tg_posts(int index, std::vector<td::tl::unique_ptr<td
|
||||
}
|
||||
|
||||
void RepostManager::on_clients_ready() {
|
||||
for (auto &appState : m_appState->vkRepostState) {
|
||||
appState.lastLoadedPostDate = appState.lastForwardedPostDate;
|
||||
}
|
||||
for (auto &appState : m_appState->tgRepostState) {
|
||||
appState.lastLoadedPostDate = appState.lastForwardedPostDate;
|
||||
}
|
||||
|
||||
spdlog::info("checking all sources");
|
||||
m_fetcher.fetch(
|
||||
|
Loading…
Reference in New Issue
Block a user