summaryrefslogtreecommitdiff
path: root/plugins/NewStory
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-04-23 19:58:33 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-04-23 19:58:33 +0300
commit579335fcd5bfdcf3c54e8d06f181b00bde3efa58 (patch)
tree5320e6611be4fbef91c83dd0bc24741e8d0f3136 /plugins/NewStory
parent15710bfdbed4b6d9d7493cdbe39033ae43e8036e (diff)
fixes #2331 (NewStory: не до конца заполняет пространство при открытии привата)
Diffstat (limited to 'plugins/NewStory')
-rw-r--r--plugins/NewStory/src/history_control.cpp8
-rw-r--r--plugins/NewStory/src/history_control.h1
-rw-r--r--plugins/NewStory/src/history_log.cpp1
3 files changed, 8 insertions, 2 deletions
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index bfebfb4600..6d7f6a339f 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -153,15 +153,15 @@ static void FixScrollPosition(HWND hwnd, NewstoryListData *data)
data->cachedMaxTopPixel = (windowHeight < tmp) ? windowHeight - tmp : 0;
}
- if (data->scrollTopItem < 0) {
+ if (data->scrollTopItem < 0)
data->scrollTopItem = 0;
- }
if ((data->scrollTopItem > data->cachedMaxTopItem) ||
((data->scrollTopItem == data->cachedMaxTopItem) && (data->scrollTopPixel < data->cachedMaxTopPixel))) {
data->scrollTopItem = data->cachedMaxTopItem;
data->scrollTopPixel = data->cachedMaxTopPixel;
}
+
RecalcScrollBar(hwnd, data);
}
@@ -613,6 +613,10 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
}
return TRUE;
+ case NSM_SEEKEND:
+ SendMessage(hwnd, NSM_SETCARET, data->items.getCount() - 1, 1);
+ break;
+
case NSM_COPY:
{
CMStringW res;
diff --git a/plugins/NewStory/src/history_control.h b/plugins/NewStory/src/history_control.h
index 934da14054..80a95047ac 100644
--- a/plugins/NewStory/src/history_control.h
+++ b/plugins/NewStory/src/history_control.h
@@ -71,6 +71,7 @@ enum
NSM_GETCOUNT,
//
+ NSM_SEEKEND,
NSM_SEEKTIME,
NSM_LAST
diff --git a/plugins/NewStory/src/history_log.cpp b/plugins/NewStory/src/history_log.cpp
index 0fb7b1134b..1bcd86ab24 100644
--- a/plugins/NewStory/src/history_log.cpp
+++ b/plugins/NewStory/src/history_log.cpp
@@ -73,6 +73,7 @@ public:
void ScrollToBottom() override
{
+ ::SendMessage(m_hwnd, NSM_SEEKEND, 0, 0);
}
};