mirror of https://github.com/perkeep/perkeep.git
importer, twitter: fix deleted account type, differentiate account and root titles
When being deleted the importer account node was changing from an "importerAccount" to an "importer-deleted" nodeType. I fixed it to "importerAccount-deleted" for consistency. Also, both the importer account node and the import root node ended up with the "username's Twitter Account" title which was looking confusing in the UI. I fixed the root node title to be "username's Twitter Data" instead. Change-Id: I335856ca92aca897a05d94a5f3e7d438b00ecc3e
This commit is contained in:
parent
329244af79
commit
1c8c8087c1
|
@ -930,7 +930,7 @@ func (ia *importerAcct) String() string {
|
|||
|
||||
func (ia *importerAcct) delete() error {
|
||||
if err := ia.acct.SetAttrs(
|
||||
attrNodeType, nodeTypeImporter+"-deleted",
|
||||
attrNodeType, nodeTypeImporterAccount+"-deleted",
|
||||
); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -514,7 +514,7 @@ func (r *run) getTopLevelNode(path string) (*importer.Object, error) {
|
|||
acctNode := r.AccountNode()
|
||||
|
||||
root := r.RootNode()
|
||||
rootTitle := fmt.Sprintf("%s's Twitter Account", acctNode.Attr(importer.AcctAttrUserName))
|
||||
rootTitle := fmt.Sprintf("%s's Twitter Data", acctNode.Attr(importer.AcctAttrUserName))
|
||||
log.Printf("root title = %q; want %q", root.Attr(nodeattr.Title), rootTitle)
|
||||
if err := root.SetAttr(nodeattr.Title, rootTitle); err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in New Issue