avatar reset bug fixed
This commit is contained in:
parent
89c4b2cdf6
commit
ac1800703f
@ -16,7 +16,7 @@ TOX_FILE_TRANSFER_STATE = {
|
||||
|
||||
|
||||
class StateSignal(QtCore.QObject):
|
||||
signal = QtCore.Signal(int, float)
|
||||
signal = QtCore.Signal(int, float) # state and progress
|
||||
|
||||
|
||||
class FileTransfer(QtCore.QObject):
|
||||
@ -98,7 +98,8 @@ class SendTransfer(FileTransfer):
|
||||
self._done += size
|
||||
self._state_changed.signal.emit(self.state, self._done / self._size)
|
||||
else:
|
||||
self._file.close()
|
||||
if hasattr(self, '_file'):
|
||||
self._file.close()
|
||||
self.state = TOX_FILE_TRANSFER_STATE['FINISHED']
|
||||
self._state_changed.signal.emit(self.state, 1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user