dev
Revision | 6a654b6edaa338fc890494c9fa6a19594277b6b2 (tree) |
---|---|
Time | 2012-02-22 19:25:15 |
Author | kiri_feather <kiri_feather@user...> |
Commiter | Kimura Youichi |
3ポスト以上の通知はまとめる
@@ -1545,13 +1545,19 @@ Public Class TweenMain | ||
1545 | 1545 | '新着通知 |
1546 | 1546 | If BalloonRequired() Then |
1547 | 1547 | If notifyPosts IsNot Nothing AndAlso notifyPosts.Length > 0 Then |
1548 | - 'Growlは一個ずつばらして通知 | |
1548 | + 'Growlは一個ずつばらして通知。ただし、3ポスト以上あるときはまとめる | |
1549 | 1549 | If SettingDialog.IsNotifyUseGrowl Then |
1550 | + Dim sb As New StringBuilder | |
1551 | + Dim reply As Boolean = False | |
1552 | + Dim dm As Boolean = False | |
1553 | + | |
1550 | 1554 | For Each post In notifyPosts |
1551 | - Dim sb As New StringBuilder | |
1552 | - Dim reply As Boolean = False | |
1553 | - Dim dm As Boolean = False | |
1554 | 1555 | |
1556 | + If Not notifyPosts.Count > 3 Then | |
1557 | + sb.Clear() | |
1558 | + reply = False | |
1559 | + dm = False | |
1560 | + End If | |
1555 | 1561 | If post.IsReply AndAlso Not post.IsExcludeReply Then reply = True |
1556 | 1562 | If post.IsDm Then dm = True |
1557 | 1563 | If sb.Length > 0 Then sb.Append(System.Environment.NewLine) |
@@ -1562,6 +1568,9 @@ Public Class TweenMain | ||
1562 | 1568 | sb.Append(post.Nickname).Append(" : ") |
1563 | 1569 | End Select |
1564 | 1570 | sb.Append(post.TextFromApi) |
1571 | + If notifyPosts.Count > 3 Then | |
1572 | + If notifyPosts.Last IsNot post Then Continue For | |
1573 | + End If | |
1565 | 1574 | |
1566 | 1575 | Dim title As New StringBuilder |
1567 | 1576 | Dim ntIcon As ToolTipIcon |