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

Method addSubscription

src/bitmessageqt/__init__.py:2320–2333  ·  view source on GitHub ↗
(self, address, label)

Source from the content-addressed store, hash-verified

2318 self.rerenderAddressBook()
2319
2320 def addSubscription(self, address, label):
2321 # This should be handled outside of this function, for error displaying
2322 # and such, but it must also be checked here.
2323 if shared.isAddressInMySubscriptionsList(address):
2324 return
2325 # Add to database (perhaps this should be separated from the MyForm class)
2326 sqlExecute(
2327 '''INSERT INTO subscriptions VALUES (?,?,?)''',
2328 label, address, True
2329 )
2330 self.rerenderMessagelistFromLabels()
2331 shared.reloadBroadcastSendersForWhichImWatching()
2332 self.rerenderAddressBook()
2333 self.rerenderTabTreeSubscriptions()
2334
2335 def click_pushButtonAddSubscription(self):
2336 dialog = dialogs.NewSubscriptionDialog(self)

Callers 3

subscribeFunction · 0.80

Calls 4

rerenderAddressBookMethod · 0.95
sqlExecuteFunction · 0.90

Tested by

no test coverage detected