removed left over commented code

This commit is contained in:
Alfred Kamanda 2025-01-27 12:42:48 +03:00
parent a6cd4b5fca
commit 73b501c8aa
Signed by: Alfred-mk
GPG Key ID: 7EA3D01708908703
3 changed files with 1 additions and 5 deletions

View File

@ -102,14 +102,12 @@ func NewMenuHandlers(appFlags *FlagManager, userdataStore db.Db, accountService
return h, nil
}
// WithPersister sets persister instance to the handlers.
// func (h *MenuHandlers) WithPersister(pe *persist.Persister) *MenuHandlers {
// SetPersister sets persister instance to the handlers.
func (h *MenuHandlers) SetPersister(pe *persist.Persister) {
if h.pe != nil {
panic("persister already set")
}
h.pe = pe
//return h
}
// Init initializes the handler for a new session.

View File

@ -266,7 +266,6 @@ func TestWithPersister(t *testing.T) {
h.SetPersister(p)
assert.Equal(t, p, h.pe, "The persister should be set correctly.")
//assert.Equal(t, h, result, "The returned handler should be the same instance.")
}
func TestWithPersister_PanicWhenAlreadySet(t *testing.T) {

View File

@ -60,7 +60,6 @@ func (ls *LocalHandlerService) GetHandler(accountService remote.AccountService)
if err != nil {
return nil, err
}
//appHandlers = appHandlers.WithPersister(ls.Pe)
appHandlers.SetPersister(ls.Pe)
ls.DbRs.AddLocalFunc("check_blocked_status", appHandlers.CheckBlockedStatus)
ls.DbRs.AddLocalFunc("set_language", appHandlers.SetLanguage)