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

Method updateSentItemStatusByAckdata

src/bitmessageqt/__init__.py:1731–1753  ·  view source on GitHub ↗
(self, ackdata, textToDisplay)

Source from the content-addressed store, hash-verified

1729 sent.item(i, 3).setText(textToDisplay)
1730
1731 def updateSentItemStatusByAckdata(self, ackdata, textToDisplay):
1732 for sent in [self.ui.tableWidgetInbox, self.ui.tableWidgetInboxSubscriptions, self.ui.tableWidgetInboxChans]:
1733 treeWidget = self.widgetConvert(sent)
1734 if self.getCurrentFolder(treeWidget) != "sent":
1735 continue
1736 for i in range(sent.rowCount()):
1737 toAddress = sent.item(
1738 i, 0).data(QtCore.Qt.UserRole)
1739 tableAckdata = sent.item(
1740 i, 3).data(QtCore.Qt.UserRole).toPyObject()
1741 status, addressVersionNumber, streamNumber, ripe = decodeAddress(
1742 toAddress)
1743 if ackdata == tableAckdata:
1744 sent.item(i, 3).setToolTip(textToDisplay)
1745 try:
1746 newlinePosition = textToDisplay.indexOf('\n')
1747 except: # If someone misses adding a "_translate" to a string before passing it to this function, this function won't receive a qstring which will cause an exception.
1748 newlinePosition = 0
1749 if newlinePosition > 1:
1750 sent.item(i, 3).setText(
1751 textToDisplay[:newlinePosition])
1752 else:
1753 sent.item(i, 3).setText(textToDisplay)
1754
1755 def removeInboxRowByMsgid(self, msgid): # msgid and inventoryHash are the same thing
1756 for inbox in ([

Callers

nothing calls this directly

Calls 4

widgetConvertMethod · 0.95
getCurrentFolderMethod · 0.95
decodeAddressFunction · 0.90
dataMethod · 0.45

Tested by

no test coverage detected