2023.12.21.0

Update 'new log data' notification
Feed: improve last session loading
This commit is contained in:
Andy
2023-12-21 10:01:30 +03:00
parent dde024276b
commit e3da1bf1d3
3 changed files with 25 additions and 15 deletions

View File

@@ -318,7 +318,7 @@ Namespace DownloadObjects
Return False
End If
End Function
If Not GetLast Then __getFiles.Invoke
__getFiles.Invoke
If Not GetLast And GetFilesOnly And Not fList.ListExists Then
MsgBoxE({"No session files found", "Get session files"}, vbExclamation)
ElseIf Not GetLast AndAlso fList.ListExists Then
@@ -352,18 +352,24 @@ Namespace DownloadObjects
MsgBoxE(m)
End If
End Using
ElseIf Downloader.FilesSessionActual(False).Exists OrElse __getFiles.Invoke Then
If Downloader.FilesSessionActual(False).Exists Then
f = Downloader.FilesSessionActual(False)
ElseIf Downloader.FilesSessionActual(False).Exists OrElse fList.ListExists Then
If GetLast Then
If fList.ListExists Then
f = fList(IIf(fList.Count > 1 And Downloader.FilesSessionActual(False).Exists, 1, 0))
Else
f = fList(0)
f = Downloader.FilesSessionActual(False)
End If
Else
f = Downloader.FilesSessionActual(False)
End If
If f.Exists Then
x = New XmlFile(f,, False) With {.AllowSameNames = True, .XmlReadOnly = True}
x.LoadData()
If x.Count > 0 Then DataList.Clear() : DataList.ListAddList(x, lcr)
x.Dispose()
CleanDataList()
RefillList(False)
End If
Else
m.Text = "Saved sessions not found"
MsgBoxE(m)

View File

@@ -842,10 +842,7 @@ CloseResume:
#End Region
#End Region
Private Sub BTT_LOG_Click(sender As Object, e As EventArgs) Handles BTT_LOG.Click
MyMainLOG_ShowForm(Settings.Design,,,, Sub()
MainFrameObj.UpdateLogButton()
MainFrameObj.LogFormClosed()
End Sub)
MainFrameObj.ShowLog()
End Sub
Private Sub BTT_VERSION_INFO_Click(sender As Object, e As EventArgs) Handles BTT_VERSION_INFO.Click
CheckVersion(True)

View File

@@ -70,6 +70,12 @@ Friend Class MainFrameObjects : Implements INotificator
Friend Function GetUserListProvider(ByVal WithCollections As Boolean) As IFormatProvider
Return MF.GetUserListProvider(WithCollections)
End Function
Friend Sub ShowLog()
MyMainLOG_ShowForm(Settings.Design,,,, Sub()
UpdateLogButton()
LogFormClosed()
End Sub)
End Sub
#End Region
#Region "Notifications"
Private Sub INotificator_ShowNotification(ByVal Text As String, ByVal Image As SFile) Implements INotificator.ShowNotification
@@ -93,6 +99,7 @@ Friend Class MainFrameObjects : Implements INotificator
Case $"{NotificationInternalKey}_{NotifyObj.Channels}" : MF.MyChannels.FormShowS()
Case $"{NotificationInternalKey}_{NotifyObj.SavedPosts}" : MF.MySavedPosts.FormShowS()
Case $"{NotificationInternalKey}_{NotifyObj.STDownloader}" : VideoDownloader.FormShowS()
Case $"{NotificationInternalKey}_{NotifyObj.LOG}" : ShowLog()
Case Else : Focus(True)
End Select
ElseIf Settings.Automation Is Nothing OrElse Not Settings.Automation.NotificationClicked(Key, found, activateForm) Then