MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / deleteRowFromMessagelist

Method deleteRowFromMessagelist

src/bitmessageqt/__init__.py:3095–3112  ·  view source on GitHub ↗
(self, row = None, inventoryHash = None, ackData = None, messageLists = None)

Source from the content-addressed store, hash-verified

3093 " twice. Try renaming the existing one if you want."))
3094
3095 def deleteRowFromMessagelist(self, row = None, inventoryHash = None, ackData = None, messageLists = None):
3096 if messageLists is None:
3097 messageLists = (self.ui.tableWidgetInbox, self.ui.tableWidgetInboxChans, self.ui.tableWidgetInboxSubscriptions)
3098 elif type(messageLists) not in (list, tuple):
3099 messageLists = (messageLists)
3100 for messageList in messageLists:
3101 if row is not None:
3102 inventoryHash = str(messageList.item(row, 3).data(
3103 QtCore.Qt.UserRole).toPyObject())
3104 messageList.removeRow(row)
3105 elif inventoryHash is not None:
3106 for i in range(messageList.rowCount() - 1, -1, -1):
3107 if messageList.item(i, 3).data(QtCore.Qt.UserRole).toPyObject() == inventoryHash:
3108 messageList.removeRow(i)
3109 elif ackData is not None:
3110 for i in range(messageList.rowCount() - 1, -1, -1):
3111 if messageList.item(i, 3).data(QtCore.Qt.UserRole).toPyObject() == ackData:
3112 messageList.removeRow(i)
3113
3114 # Send item on the Inbox tab to trash
3115 def on_action_InboxTrash(self):

Callers

nothing calls this directly

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected